Started store tests
This commit is contained in:
parent
5cbd6c4e46
commit
6d5accd06f
1 changed files with 21 additions and 0 deletions
21
src/store/store.spec.js
Normal file
21
src/store/store.spec.js
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import { useMainStore } from "./"
|
||||||
|
import { createApp } from 'vue';
|
||||||
|
import { createPinia } from "pinia";
|
||||||
|
import App from '@/App.vue';
|
||||||
|
|
||||||
|
describe("Store", () => {
|
||||||
|
let store = null;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
const vueApp = createApp(App);
|
||||||
|
const pinia = createPinia();
|
||||||
|
vueApp.use(pinia);
|
||||||
|
store = useMainStore();
|
||||||
|
})
|
||||||
|
|
||||||
|
it("Should Store Vehicle Year", () => {
|
||||||
|
let testYear = "2001";
|
||||||
|
store.updateVehicleYear(testYear);
|
||||||
|
expect(store.order.vehicle.year).toEqual(testYear);
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in a new issue