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 7905342e_46b6_24e2_8708_e325bac414d5["config.spec.ts"] db9e7bef_009d_3918_6e7d_543a36a38d75["vue"] 7905342e_46b6_24e2_8708_e325bac414d5 --> db9e7bef_009d_3918_6e7d_543a36a38d75 49aae190_0a6d_f5d1_c8de_aabde088509c["debug"] 7905342e_46b6_24e2_8708_e325bac414d5 --> 49aae190_0a6d_f5d1_c8de_aabde088509c style 7905342e_46b6_24e2_8708_e325bac414d5 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