config.spec.ts — vue Source File
Architecture documentation for config.spec.ts, a typescript file in the vue codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR a446a0dd_76cf_afa1_0baa_35f97c20f9a8["config.spec.ts"] c5601857_7faf_30c6_efca_20de90db006c["vue"] a446a0dd_76cf_afa1_0baa_35f97c20f9a8 --> c5601857_7faf_30c6_efca_20de90db006c 5e280904_7607_16e2_62e5_1d6d092f34a6["debug"] a446a0dd_76cf_afa1_0baa_35f97c20f9a8 --> 5e280904_7607_16e2_62e5_1d6d092f34a6 style a446a0dd_76cf_afa1_0baa_35f97c20f9a8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import Vue from 'vue'
import { warn } from 'core/util/debug'
describe('Global config', () => {
it('should warn replacing config object', () => {
const originalConfig = Vue.config
Vue.config = {}
expect(Vue.config).toBe(originalConfig)
expect('Do not replace the Vue.config object').toHaveBeenWarned()
})
describe('silent', () => {
it('should be false by default', () => {
warn('foo')
expect('foo').toHaveBeenWarned()
})
it('should work when set to true', () => {
Vue.config.silent = true
warn('foo')
expect('foo').not.toHaveBeenWarned()
Vue.config.silent = false
})
})
describe('optionMergeStrategies', () => {
it('should allow defining custom option merging strategies', () => {
const spy = vi.fn()
Vue.config.optionMergeStrategies.__test__ = (parent, child, vm) => {
spy(parent, child, vm)
return child + 1
}
const Test = Vue.extend({
__test__: 1
})
expect(spy.mock.calls.length).toBe(1)
expect(spy).toHaveBeenCalledWith(undefined, 1, undefined)
expect(Test.options.__test__).toBe(2)
const test = new Test({
__test__: 2
})
expect(spy.mock.calls.length).toBe(2)
expect(spy).toHaveBeenCalledWith(2, 2, test)
expect(test.$options.__test__).toBe(3)
})
})
describe('ignoredElements', () => {
it('should work', () => {
Vue.config.ignoredElements = ['foo', /^ion-/]
new Vue({
template: `<div><foo/><ion-foo/><ion-bar/></div>`
}).$mount()
expect('Unknown custom element').not.toHaveBeenWarned()
Vue.config.ignoredElements = []
})
})
describe('async', () => {
it('does not update synchronously when true', () => {
// ... (66 more lines)
Dependencies
- debug
- vue
Source
Frequently Asked Questions
What does config.spec.ts do?
config.spec.ts is a source file in the vue codebase, written in typescript.
What does config.spec.ts depend on?
config.spec.ts imports 2 module(s): debug, vue.
Where is config.spec.ts in the architecture?
config.spec.ts is located at test/unit/features/global-api/config.spec.ts (directory: test/unit/features/global-api).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free