test: add test for ignoredElements

This commit is contained in:
Evan You 2017-10-12 09:54:17 -04:00
parent 795b908095
commit 9f576aac7d

View File

@ -44,4 +44,15 @@ describe('Global config', () => {
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 = []
})
})
})