0๐
I would use petrol to test vue js components https://github.com/MGMonge/petrol
in that case your test would be
import AnimateNumber from './../src/components/AnimateNumber.vue';
import VueTestCase from "petrol/core/VueTestCase.js";
export default class AnimateNumberTest extends VueTestCase {
/** @test */
it_display_the_correct_number() {
this.SUT = this.mount(AnimateNumber, {number: 2});
this.assertEquals(2, this.SUT.displayNumber);
this.SUT = this.mount(AnimateNumber, {number: 5});
this.assertEquals(5, this.SUT.displayNumber);
}
}
- [Vuejs]-VueJs โ Is there any sample of using VueJs with new webpack 4 setup?
- [Vuejs]-Getting the current position of the slide when you swipe on VueJS?
Source:stackexchange.com