wip: make singleton mutations affect all app instances
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Vue from '@vue/compat'
|
||||
import { toggleDeprecationWarning } from '../../runtime-core/src/compat/compatConfig'
|
||||
import { createApp } from '../src/esm-index'
|
||||
import { triggerEvent } from './utils'
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -64,3 +65,12 @@ test('GLOBAL_IGNORED_ELEMENTS', () => {
|
||||
})
|
||||
expect(el.innerHTML).toBe(`<v-foo></v-foo><foo></foo>`)
|
||||
})
|
||||
|
||||
test('singleton config should affect apps created with createApp()', () => {
|
||||
Vue.config.ignoredElements = [/^v-/, 'foo']
|
||||
const el = document.createElement('div')
|
||||
createApp({
|
||||
template: `<v-foo/><foo/>`
|
||||
}).mount(el)
|
||||
expect(el.innerHTML).toBe(`<v-foo></v-foo><foo></foo>`)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user