createCompareFn() — vue Function Reference
Architecture documentation for the createCompareFn() function in helpers.ts from the vue codebase.
Entity Profile
Dependency Diagram
graph TD 257dff81_0358_e7bb_2ad2_f499782085a1["createCompareFn()"] 17e86ae4_9dda_9399_9625_68fceea277c4["helpers.ts"] 257dff81_0358_e7bb_2ad2_f499782085a1 -->|defined in| 17e86ae4_9dda_9399_9625_68fceea277c4 style 257dff81_0358_e7bb_2ad2_f499782085a1 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