Conditions | 6 |
Total Lines | 34 |
Code Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { createLocalVue, shallowMount } from '@vue/test-utils'; |
||
7 | function createWrapper(privileges = []) { |
||
8 | const localVue = createLocalVue(); |
||
9 | localVue.use(Vuex); |
||
10 | |||
11 | return shallowMount(Component.build('sw-product-detail-specifications'), { |
||
12 | localVue, |
||
13 | mocks: { |
||
14 | $t: key => key, |
||
15 | $tc: key => key, |
||
16 | $store: State._store |
||
17 | }, |
||
18 | provide: { |
||
19 | feature: { |
||
20 | isActive: () => true |
||
21 | }, |
||
22 | acl: { |
||
23 | can: (identifier) => { |
||
24 | if (!identifier) { |
||
25 | return true; |
||
26 | } |
||
27 | |||
28 | return privileges.includes(identifier); |
||
29 | } |
||
30 | } |
||
31 | }, |
||
32 | stubs: { |
||
33 | 'sw-card': true, |
||
34 | 'sw-product-packaging-form': true, |
||
35 | 'sw-product-detail-properties': true, |
||
36 | 'sw-product-feature-set-form': true, |
||
37 | 'sw-custom-field-set-renderer': true |
||
38 | } |
||
39 | }); |
||
40 | } |
||
41 | |||
63 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.