File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed
test/unit/features/options Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -34,16 +34,6 @@ if (process.env.NODE_ENV !== 'production') {
34
34
}
35
35
return defaultStrat ( parent , child )
36
36
}
37
-
38
- strats . name = function ( parent , child , vm ) {
39
- if ( vm && child ) {
40
- warn (
41
- 'options "name" can only be used as a component definition option, ' +
42
- 'not during instance creation.'
43
- )
44
- }
45
- return defaultStrat ( parent , child )
46
- }
47
37
}
48
38
49
39
/**
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
2
3
3
describe ( 'Options name' , ( ) => {
4
- it ( 'should warn when giving instance a name' , ( ) => {
5
- const Comp = Vue . component ( 'custom' , { name : 'custom' } )
6
- new Comp ( )
7
- expect ( `options "name" can only be used as a component definition option` ) . not . toHaveBeenWarned ( )
8
-
9
- new Vue ( {
10
- name : 'SuperVue'
11
- } ) . $mount ( )
12
- expect ( `options "name" can only be used as a component definition option` ) . toHaveBeenWarned ( )
13
- } )
14
-
15
4
it ( 'should contain itself in self components' , ( ) => {
16
5
const vm = Vue . extend ( {
17
6
name : 'SuperVue'
You can’t perform that action at this time.
0 commit comments