parent.spec.ts — vue Source File
Architecture documentation for parent.spec.ts, a typescript file in the vue codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 960bce1d_6f15_4f82_9342_0746983c3a36["parent.spec.ts"] db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 960bce1d_6f15_4f82_9342_0746983c3a36 --> db9e7bef_009d_3918_6e7d_543a36a38d75 style 960bce1d_6f15_4f82_9342_0746983c3a36 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
describe('Options parent', () => {
it('should work', () => {
const parent = new Vue({
render() {}
}).$mount()
const child = new Vue({
parent: parent,
render() {}
}).$mount()
// this option is straight-forward
// it should register 'parent' as a $parent for 'child'
// and push 'child' to $children array on 'parent'
expect(child.$options.parent).toBeDefined()
expect(child.$options.parent).toEqual(parent)
expect(child.$parent).toBeDefined()
expect(child.$parent).toEqual(parent)
expect(parent.$children).toContain(child)
// destroy 'child' and check if it was removed from 'parent' $children
child.$destroy()
expect(parent.$children.length).toEqual(0)
parent.$destroy()
})
})
Dependencies
- vue
Source
Frequently Asked Questions
What does parent.spec.ts do?
parent.spec.ts is a source file in the vue codebase, written in typescript.
What does parent.spec.ts depend on?
parent.spec.ts imports 1 module(s): vue.
Where is parent.spec.ts in the architecture?
parent.spec.ts is located at test/unit/features/options/parent.spec.ts (directory: test/unit/features/options).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free