mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 09:50:21 +00:00
Fix test cases for inline prop
This commit is contained in:
@@ -76,10 +76,10 @@ describe('BarChart', () => {
|
||||
components: { BarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('BarChart', () => {
|
||||
components: { BarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('BubbleChart', () => {
|
||||
components: { BubbleChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('BubbleChart', () => {
|
||||
components: { BubbleChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('DoughnutChart', () => {
|
||||
components: { DoughnutChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('DoughnutChart', () => {
|
||||
components: { DoughnutChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('HorizontalBarChart', () => {
|
||||
components: { HorizontalBarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('HorizontalBarChart', () => {
|
||||
components: { HorizontalBarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('LineChart', () => {
|
||||
components: { LineChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('LineChart', () => {
|
||||
components: { LineChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -75,10 +75,10 @@ describe('PieChart', () => {
|
||||
components: { PieChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -99,7 +99,7 @@ describe('PieChart', () => {
|
||||
components: { PieChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('PolarChart', () => {
|
||||
components: { PolarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('PolarChart', () => {
|
||||
components: { PolarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -75,10 +75,10 @@ describe('RadarChart', () => {
|
||||
components: { RadarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -99,7 +99,7 @@ describe('RadarChart', () => {
|
||||
components: { RadarChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -76,10 +76,10 @@ describe('ScatterChart', () => {
|
||||
components: { ScatterChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
|
||||
it('should add inline plugins based on prop', () => {
|
||||
@@ -100,7 +100,7 @@ describe('ScatterChart', () => {
|
||||
components: { ScatterChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0]._plugins).to.exist
|
||||
expect(vm.$children[0]._plugins.length).to.equal(1)
|
||||
expect(vm.$children[0].$data._plugins).to.exist
|
||||
expect(vm.$children[0].$data._plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user