Skip to content

Commit 482048b

Browse files
committed
βœ… πŸ› Fix tests
1 parent bb21a40 commit 482048b

File tree

7 files changed

+98
-14
lines changed

7 files changed

+98
-14
lines changed

β€Žtest/unit/specs/Bar.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('BarChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<bar-chart></bar-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
BarChart
16+
)
17+
},
1418
components: { BarChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('BarChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<bar-chart chartId="barchartprop"></bar-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
BarChart, {
32+
props: {
33+
chartId: 'barchartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { BarChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/Bubble.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('BubbleChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<bubble-chart></bubble-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
BubbleChart
16+
)
17+
},
1418
components: { BubbleChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('BubbleChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<bubble-chart chartId="bubblechartprop"></bubble-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
BubbleChart, {
32+
props: {
33+
chartId: 'bubblechartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { BubbleChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/Doughnut.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('DoughnutChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<doughnut-chart></doughnut-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
DoughnutChart
16+
)
17+
},
1418
components: { DoughnutChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('DoughnutChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<doughnut-chart chartId="doughnutchartprop"></doughnut-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
DoughnutChart, {
32+
props: {
33+
chartId: 'doughnutchartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { DoughnutChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/Line.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('LineChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<line-chart></line-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
LineChart
16+
)
17+
},
1418
components: { LineChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('LineChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<line-chart chartId="linechartprop"></line-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
LineChart, {
32+
props: {
33+
chartId: 'linechartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { LineChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/Pie.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('PieChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<pie-chart></pie-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
PieChart
16+
)
17+
},
1418
components: { PieChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('PieChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<pie-chart chartId="piechartprop"></pie-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
PieChart, {
32+
props: {
33+
chartId: 'piechartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { PieChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/PolarArea.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('PolarChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<polar-chart></polar-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
PolarChart
16+
)
17+
},
1418
components: { PolarChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('PolarChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<polar-chart chartId="polarchartprop"></polar-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
PolarChart, {
32+
props: {
33+
chartId: 'polarchartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { PolarChart }
2739
}).$mount(el)
2840

β€Žtest/unit/specs/Radar.spec.jsβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ describe('RadarChart', () => {
1010

1111
it('should render a canvas', () => {
1212
const vm = new Vue({
13-
template: '<radar-chart></radar-chart>',
13+
render: function (createElement) {
14+
return createElement(
15+
RadarChart
16+
)
17+
},
1418
components: { RadarChart }
1519
}).$mount(el)
1620

@@ -22,7 +26,15 @@ describe('RadarChart', () => {
2226

2327
it('should change id based on prop', () => {
2428
const vm = new Vue({
25-
template: '<radar-chart chartId="rodarchartprop"></radar-chart>',
29+
render: function (createElement) {
30+
return createElement(
31+
RadarChart, {
32+
props: {
33+
chartId: 'rodarchartprop'
34+
}
35+
}
36+
)
37+
},
2638
components: { RadarChart }
2739
}).$mount(el)
2840

0 commit comments

Comments
Β (0)