|
1 | 1 | import VueMdc from 'src'
|
2 | 2 | import * as all from 'src'
|
3 |
| -import { Vue } from '../helpers/utils.js' |
| 3 | +import { Vue } from '../helpers/utils' |
4 | 4 |
|
5 |
| -function comp (name) { |
| 5 | +function comp (Vue, name) { |
6 | 6 | return function () {
|
7 | 7 | should.exist(Vue.component(name))
|
8 | 8 | }
|
9 | 9 | }
|
10 | 10 |
|
11 |
| -function dir (name) { |
| 11 | +function dir (Vue, name) { |
12 | 12 | return function () {
|
13 | 13 | should.exist(Vue.directive(name))
|
14 | 14 | }
|
@@ -55,26 +55,25 @@ describe('VueMdc', function () {
|
55 | 55 | })
|
56 | 56 |
|
57 | 57 | describe('Register components', function () {
|
58 |
| - before(function () { |
59 |
| - Vue.use(VueMdc) |
60 |
| - }) |
61 |
| - |
| 58 | + const Vue1 = Vue.extend() |
62 | 59 | components.forEach(name => {
|
63 |
| - it(`registers Mdc${name}`, comp(`Mdc${name}`)) |
| 60 | + Vue1.use(VueMdc) |
| 61 | + it(`registers Mdc${name}`, comp(Vue1, `Mdc${name}`)) |
64 | 62 | })
|
65 | 63 |
|
66 |
| - it('registers v-ripple', dir('ripple')) |
| 64 | + it('registers v-ripple', dir(Vue1, 'ripple')) |
67 | 65 | })
|
68 | 66 |
|
69 |
| - describe.skip('Prefixes', function () { |
| 67 | + describe('Prefixes', function () { |
| 68 | + const Vue2 = Vue.extend() |
70 | 69 | before(function () {
|
71 | 70 | VueMdc.installed = false
|
72 |
| - Vue.use(VueMdc, { |
| 71 | + Vue2.use(VueMdc, { |
73 | 72 | prefix: 'Ui',
|
74 | 73 | })
|
75 | 74 | })
|
76 | 75 | components.forEach(name => {
|
77 |
| - it(`registers Ui${name}`, comp(`Ui${name}`)) |
| 76 | + it(`registers Ui${name}`, comp(Vue2, `Ui${name}`)) |
78 | 77 | })
|
79 | 78 | })
|
80 | 79 | })
|
0 commit comments