mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
✅ Update tests for addPlugin method
This commit is contained in:
@@ -61,4 +61,24 @@ describe('ScatterChart', () => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('should add an inline plugin to the array', () => {
|
||||
const testPlugin = {
|
||||
id: 'test'
|
||||
}
|
||||
|
||||
const vm = new Vue({
|
||||
render: function (createElement) {
|
||||
return createElement(
|
||||
ScatterChart
|
||||
)
|
||||
},
|
||||
components: { ScatterChart }
|
||||
}).$mount(el)
|
||||
|
||||
expect(vm.$children[0].plugins).to.exist
|
||||
vm.$children[0].addPlugin(testPlugin)
|
||||
|
||||
expect(vm.$children[0].plugins.length).to.equal(1)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user