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 e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e["helpers.ts"] a0018c2e_588b_7c7d_180e_8f2d52c05df2["transition-group.spec.ts"] a0018c2e_588b_7c7d_180e_8f2d52c05df2 --> e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e c33abd98_c1da_3529_aeca_27abb94493ef["transition-mode.spec.ts"] c33abd98_c1da_3529_aeca_27abb94493ef --> e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e 3d8fdb15_b60e_045b_9a29_a0c1e85bc616["transition-with-keep-alive.spec.ts"] 3d8fdb15_b60e_045b_9a29_a0c1e85bc616 --> e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e 46da134a_3029_8b1c_441a_52bd19190e3f["transition.spec.ts"] 46da134a_3029_8b1c_441a_52bd19190e3f --> e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e style e36f34fa_ce0b_6e35_f3e0_e2cebbd0d05e 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 CompilerSFC domain, StyleProcessor 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: CompilerSFC, subdomain: StyleProcessor, directory: test/transition).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free