Browse Source

fix tests for global name override

Evan You 10 years ago
parent
commit
d9ce1306e1
1 changed files with 2 additions and 3 deletions
  1. 2 3
      test/unit/features/options/name.spec.js

+ 2 - 3
test/unit/features/options/name.spec.js

@@ -39,13 +39,12 @@ describe('Options name', () => {
     expect(vm.options.components['Hyper*Vue']).toBeUndefined()
   })
 
-  it('id should override given name when using Vue.component', () => {
+  it('id should not override given name when using Vue.component', () => {
     const SuperComponent = Vue.component('super-component', {
       name: 'SuperVue'
     })
 
-    expect(SuperComponent.options.components['SuperVue']).toBeUndefined()
-    expect(SuperComponent.options.components['super-component']).toBeDefined()
+    expect(SuperComponent.options.components['SuperVue']).toEqual(SuperComponent)
     expect(SuperComponent.options.components['super-component']).toEqual(SuperComponent)
   })
 })