Files
ruoyi-plus-vben5/apps/web-antd/src/store/modules/example.test.ts
2024-06-08 16:33:49 +08:00

18 lines
415 B
TypeScript

import { createPinia, setActivePinia } from 'pinia';
import { beforeEach, describe, expect, it } from 'vitest';
import { useCounterStore } from './example';
describe('useCounterStore', () => {
beforeEach(() => {
setActivePinia(createPinia());
});
it('count test', () => {
setActivePinia(createPinia());
const counterStore = useCounterStore();
expect(counterStore.count).toBe(0);
});
});