Skip to content

Commit d9ce130

Browse files
committed
fix tests for global name override
1 parent 56ebb00 commit d9ce130

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/unit/features/options/name.spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ describe('Options name', () => {
3939
expect(vm.options.components['Hyper*Vue']).toBeUndefined()
4040
})
4141

42-
it('id should override given name when using Vue.component', () => {
42+
it('id should not override given name when using Vue.component', () => {
4343
const SuperComponent = Vue.component('super-component', {
4444
name: 'SuperVue'
4545
})
4646

47-
expect(SuperComponent.options.components['SuperVue']).toBeUndefined()
48-
expect(SuperComponent.options.components['super-component']).toBeDefined()
47+
expect(SuperComponent.options.components['SuperVue']).toEqual(SuperComponent)
4948
expect(SuperComponent.options.components['super-component']).toEqual(SuperComponent)
5049
})
5150
})

0 commit comments

Comments
 (0)