createCompareFn() — vue Function Reference
Architecture documentation for the createCompareFn() function in helpers.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 2cfb116e_b0ba_c929_547f_e28ab91c1f41["createCompareFn()"] e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e["helpers.ts"] 2cfb116e_b0ba_c929_547f_e28ab91c1f41 -->|defined in| e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e style 2cfb116e_b0ba_c929_547f_e28ab91c1f41 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
test/transition/helpers.ts lines 20–48
function createCompareFn(spy) {
const hasWarned = msg => {
let count = spy.calls.count()
let args
while (count--) {
args = spy.calls.argsFor(count)
if (args.some(containsMsg)) {
return true
}
}
function containsMsg(arg) {
return arg.toString().indexOf(msg) > -1
}
}
return {
compare: msg => {
asserted = asserted.concat(msg)
const warned = Array.isArray(msg) ? msg.some(hasWarned) : hasWarned(msg)
return {
pass: warned,
message: warned
? 'Expected message "' + msg + '" not to have been warned'
: 'Expected message "' + msg + '" to have been warned'
}
}
}
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does createCompareFn() do?
createCompareFn() is a function in the vue codebase, defined in test/transition/helpers.ts.
Where is createCompareFn() defined?
createCompareFn() is defined in test/transition/helpers.ts at line 20.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free