helpers.ts — vue Source File
Architecture documentation for helpers.ts, a typescript file in the vue codebase. 0 imports, 4 dependents.
Entity Profile
Dependency Diagram
graph LR 17e86ae4_9dda_9399_9625_68fceea277c4["helpers.ts"] 86f0f5d8_fabb_6646_9236_265b85d4c380["transition-group.spec.ts"] 86f0f5d8_fabb_6646_9236_265b85d4c380 --> 17e86ae4_9dda_9399_9625_68fceea277c4 2a288951_eafd_5cd7_a83f_557dbc3f3d9c["transition-mode.spec.ts"] 2a288951_eafd_5cd7_a83f_557dbc3f3d9c --> 17e86ae4_9dda_9399_9625_68fceea277c4 69fd8244_8cc8_f06a_c243_a9cfa03ccd05["transition-with-keep-alive.spec.ts"] 69fd8244_8cc8_f06a_c243_a9cfa03ccd05 --> 17e86ae4_9dda_9399_9625_68fceea277c4 4589ee86_a3c5_87f5_c259_ee19bd430d0e["transition.spec.ts"] 4589ee86_a3c5_87f5_c259_ee19bd430d0e --> 17e86ae4_9dda_9399_9625_68fceea277c4 style 17e86ae4_9dda_9399_9625_68fceea277c4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
export { waitForUpdate } from '../helpers/wait-for-update'
export { nextFrame } from 'web/runtime/transition-util'
// toHaveBeenWarned() matcher
function noop() {}
if (typeof console === 'undefined') {
// @ts-ignore
window.console = {
warn: noop,
error: noop
}
}
// avoid info messages during test
console.info = noop
let asserted
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'
}
}
}
}
// define custom matcher for warnings
beforeEach(() => {
asserted = []
// @ts-ignore
spyOn(console, 'warn')
// @ts-ignore
spyOn(console, 'error')
jasmine.addMatchers({
toHaveBeenWarned: () => createCompareFn(console.error),
toHaveBeenTipped: () => createCompareFn(console.warn)
})
// ... (85 more lines)
Domain
Subdomains
Imported By
Source
Frequently Asked Questions
What does helpers.ts do?
helpers.ts is a source file in the vue codebase, written in typescript. It belongs to the VueCore domain, VDom subdomain.
What functions are defined in helpers.ts?
helpers.ts defines 4 function(s): createCompareFn, injectStyles, insertCSS, noop.
What files import helpers.ts?
helpers.ts is imported by 4 file(s): transition-group.spec.ts, transition-mode.spec.ts, transition-with-keep-alive.spec.ts, transition.spec.ts.
Where is helpers.ts in the architecture?
helpers.ts is located at test/transition/helpers.ts (domain: VueCore, subdomain: VDom, directory: test/transition).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free