@@ -13,7 +13,9 @@ describe('use', () => {
1313 const localVueTwo = createLocalVue ( )
1414 localVueTwo . use ( CompositionApi )
1515
16- expect ( 'Another instance of vue installed' ) . not . toHaveBeenWarned ( )
16+ expect (
17+ '[vue-composition-api] another instance of Vue installed'
18+ ) . not . toHaveBeenWarned ( )
1719 } )
1820
1921 it ( 'should warn install in multiple vue' , ( ) => {
@@ -28,26 +30,30 @@ describe('use', () => {
2830
2931 // @ts -ignore
3032 CompositionApi . install ( fakeVue )
31- expect ( 'Another instance of vue installed' ) . toHaveBeenWarned ( )
33+ expect (
34+ '[vue-composition-api] another instance of Vue installed'
35+ ) . toHaveBeenWarned ( )
3236 } finally {
3337 Vue . use ( CompositionApi )
34- expect ( 'Another instance of vue installed' ) . toHaveBeenWarned ( )
38+ expect (
39+ '[vue-composition-api] another instance of Vue installed'
40+ ) . toHaveBeenWarned ( )
3541 }
3642 } )
3743
3844 it ( 'should warn installing multiple times' , ( ) => {
3945 const localVueOne = createLocalVue ( )
4046 localVueOne . use ( CompositionApi )
4147
42- expect ( ( ) => {
43- // vue prevents the same plugin of being installed, this will create a new plugin instance
44- localVueOne . use ( {
45- install ( v ) {
46- CompositionApi . install ( v )
47- } ,
48- } )
49- } ) . toThrowError (
50- 'already installed. Vue.use(VueCompositionAPI) should be called only once.'
51- )
48+ // vue prevents the same plugin of being installed, this will create a new plugin instance
49+ localVueOne . use ( {
50+ install ( v ) {
51+ CompositionApi . install ( v )
52+ } ,
53+ } )
54+
55+ expect (
56+ '[vue-composition-api] already installed. Vue.use(VueCompositionAPI) should be called only once.'
57+ ) . toHaveBeenWarned ( )
5258 } )
5359} )
0 commit comments