1- import { createLocalVue , mount } from '@vue/test-utils'
1+ import { mount } from '@vue/test-utils'
22import { IconsPlugin } from './index'
33import { BIcon } from './icon'
44import { makeIcon } from './helpers/make-icon'
5+ import { Vue } from '../vue'
56
6- const localVue = createLocalVue ( )
7- localVue . use ( IconsPlugin )
7+ Vue . use ( IconsPlugin )
88
99describe ( 'icons' , ( ) => {
1010 it ( 'b-icon has expected structure' , async ( ) => {
1111 const wrapper = mount ( BIcon , {
12- localVue,
1312 propsData : {
1413 icon : 'alarm-fill'
1514 }
@@ -40,7 +39,6 @@ describe('icons', () => {
4039
4140 it ( 'b-icon has expected structure when `stacked` prop is true' , async ( ) => {
4241 const wrapper = mount ( BIcon , {
43- localVue,
4442 propsData : {
4543 icon : 'alarm-fill' ,
4644 stacked : true
@@ -77,7 +75,6 @@ describe('icons', () => {
7775 // As we don't specify a parent instance (which has all the registered
7876 // components for the icons)
7977 const wrapper = mount ( BIcon , {
80- localVue,
8178 propsData : {
8279 icon : ''
8380 }
@@ -99,7 +96,6 @@ describe('icons', () => {
9996 // This test assumes Vue doesn't puke on unknown component names
10097 // As we currently do not check the validity of icon names
10198 const wrapper = mount ( BIcon , {
102- localVue,
10399 propsData : {
104100 icon : undefined
105101 }
@@ -117,7 +113,6 @@ describe('icons', () => {
117113
118114 it ( 'b-icon with unknown icon name renders BIconBlank' , async ( ) => {
119115 const wrapper = mount ( BIcon , {
120- localVue,
121116 propsData : {
122117 icon : 'unknown-icon-name'
123118 }
@@ -138,7 +133,6 @@ describe('icons', () => {
138133
139134 it ( 'b-icon variant works' , async ( ) => {
140135 const wrapper = mount ( BIcon , {
141- localVue,
142136 propsData : {
143137 icon : 'alarm-fill' ,
144138 variant : 'danger'
@@ -164,7 +158,6 @@ describe('icons', () => {
164158
165159 it ( 'b-icon font-scale prop works' , async ( ) => {
166160 const wrapper = mount ( BIcon , {
167- localVue,
168161 propsData : {
169162 icon : 'alarm-fill' ,
170163 fontScale : '1.25'
@@ -200,7 +193,6 @@ describe('icons', () => {
200193 }
201194
202195 const wrapper = mount ( ParentComponent , {
203- localVue,
204196 propsData : {
205197 icon : 'fake-icon-test'
206198 }
@@ -221,7 +213,6 @@ describe('icons', () => {
221213
222214 it ( 'b-icon rotate prop works' , async ( ) => {
223215 const wrapper = mount ( BIcon , {
224- localVue,
225216 propsData : {
226217 icon : 'alarm-fill' ,
227218 rotate : '45'
@@ -246,7 +237,6 @@ describe('icons', () => {
246237
247238 it ( 'b-icon scale prop works' , async ( ) => {
248239 const wrapper = mount ( BIcon , {
249- localVue,
250240 propsData : {
251241 icon : 'alarm-fill' ,
252242 scale : '1.5'
@@ -271,7 +261,6 @@ describe('icons', () => {
271261
272262 it ( 'b-icon flip-h prop works' , async ( ) => {
273263 const wrapper = mount ( BIcon , {
274- localVue,
275264 propsData : {
276265 icon : 'alarm-fill' ,
277266 flipH : true
@@ -296,7 +285,6 @@ describe('icons', () => {
296285
297286 it ( 'b-icon flip-v prop works' , async ( ) => {
298287 const wrapper = mount ( BIcon , {
299- localVue,
300288 propsData : {
301289 icon : 'alarm-fill' ,
302290 flipV : true
@@ -321,7 +309,6 @@ describe('icons', () => {
321309
322310 it ( 'b-icon flip-h prop works with flip-v prop' , async ( ) => {
323311 const wrapper = mount ( BIcon , {
324- localVue,
325312 propsData : {
326313 icon : 'alarm-fill' ,
327314 flipH : true ,
@@ -347,7 +334,6 @@ describe('icons', () => {
347334
348335 it ( 'b-icon scale prop works with flip-h prop' , async ( ) => {
349336 const wrapper = mount ( BIcon , {
350- localVue,
351337 propsData : {
352338 icon : 'alarm-fill' ,
353339 scale : '1.5' ,
@@ -373,7 +359,6 @@ describe('icons', () => {
373359
374360 it ( 'b-icon scale prop works with flip-v prop' , async ( ) => {
375361 const wrapper = mount ( BIcon , {
376- localVue,
377362 propsData : {
378363 icon : 'alarm-fill' ,
379364 scale : '1.5' ,
@@ -399,7 +384,6 @@ describe('icons', () => {
399384
400385 it ( 'b-icon scale prop works with flip-h and flip-v prop' , async ( ) => {
401386 const wrapper = mount ( BIcon , {
402- localVue,
403387 propsData : {
404388 icon : 'alarm-fill' ,
405389 scale : '1.5' ,
@@ -426,7 +410,6 @@ describe('icons', () => {
426410
427411 it ( 'b-icon shift-h and shift-v props work' , async ( ) => {
428412 const wrapper = mount ( BIcon , {
429- localVue,
430413 propsData : {
431414 icon : 'alarm-fill' ,
432415 shiftH : 8 ,
@@ -452,7 +435,6 @@ describe('icons', () => {
452435
453436 it ( 'b-icon shift-h and shift-v props work with rotate prop' , async ( ) => {
454437 const wrapper = mount ( BIcon , {
455- localVue,
456438 propsData : {
457439 icon : 'alarm-fill' ,
458440 rotate : 45 ,
@@ -482,7 +464,6 @@ describe('icons', () => {
482464
483465 it ( 'b-icon animation prop works' , async ( ) => {
484466 const wrapper = mount ( BIcon , {
485- localVue,
486467 propsData : {
487468 icon : 'circle-fill' ,
488469 animation : 'spin'
@@ -501,7 +482,6 @@ describe('icons', () => {
501482
502483 it ( 'b-icon title prop works' , async ( ) => {
503484 const wrapper = mount ( BIcon , {
504- localVue,
505485 propsData : {
506486 icon : 'circle-fill' ,
507487 title : 'Circle'
@@ -523,7 +503,6 @@ describe('icons', () => {
523503
524504 it ( 'b-icon <title> should not render when title is undefined' , async ( ) => {
525505 const wrapper = mount ( BIcon , {
526- localVue,
527506 propsData : {
528507 icon : 'circle-fill'
529508 }
0 commit comments