inject.spec.ts — vue Source File
Architecture documentation for inject.spec.ts, a typescript file in the vue codebase. 5 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 8aaca635_356c_a829_80bb_e657fe60e2b4["inject.spec.ts"] 4ef3cec1_7e9c_23bb_5e9b_f118e8ebdf99["test-object-option.ts"] 8aaca635_356c_a829_80bb_e657fe60e2b4 --> 4ef3cec1_7e9c_23bb_5e9b_f118e8ebdf99 830d85be_ea2f_f50c_75f1_dd6812fb608f["testObjectOption"] 8aaca635_356c_a829_80bb_e657fe60e2b4 --> 830d85be_ea2f_f50c_75f1_dd6812fb608f c5601857_7faf_30c6_efca_20de90db006c["vue"] 8aaca635_356c_a829_80bb_e657fe60e2b4 --> c5601857_7faf_30c6_efca_20de90db006c 44839739_d7ca_1c00_8a38_885896b69e14["index"] 8aaca635_356c_a829_80bb_e657fe60e2b4 --> 44839739_d7ca_1c00_8a38_885896b69e14 02e43f4a_da65_7acd_5a98_0f017554a159["index"] 8aaca635_356c_a829_80bb_e657fe60e2b4 --> 02e43f4a_da65_7acd_5a98_0f017554a159 style 8aaca635_356c_a829_80bb_e657fe60e2b4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
import { Observer } from 'core/observer/index'
import { isNative, isObject, hasOwn, nextTick } from 'core/util/index'
import testObjectOption from '../../../helpers/test-object-option'
describe('Options provide/inject', () => {
testObjectOption('inject')
let injected
const injectedComp = {
inject: ['foo', 'bar'],
render() {},
created() {
injected = [this.foo, this.bar]
}
}
beforeEach(() => {
injected = null
})
it('should work', () => {
new Vue({
template: `<child/>`,
provide: {
foo: 1,
bar: false
},
components: {
child: {
template: `<injected-comp/>`,
components: {
injectedComp
}
}
}
}).$mount()
expect(injected).toEqual([1, false])
})
it('should use closest parent', () => {
new Vue({
template: `<child/>`,
provide: {
foo: 1,
bar: null
},
components: {
child: {
provide: {
foo: 3
},
template: `<injected-comp/>`,
components: {
injectedComp
}
}
}
}).$mount()
// ... (664 more lines)
Domain
Dependencies
- index
- index
- test-object-option.ts
- testObjectOption
- vue
Source
Frequently Asked Questions
What does inject.spec.ts do?
inject.spec.ts is a source file in the vue codebase, written in typescript. It belongs to the CompilerSFC domain.
What does inject.spec.ts depend on?
inject.spec.ts imports 5 module(s): index, index, test-object-option.ts, testObjectOption, vue.
Where is inject.spec.ts in the architecture?
inject.spec.ts is located at test/unit/features/options/inject.spec.ts (domain: CompilerSFC, 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