diff --git a/test/vitest/__tests__/components/common/VnLog.spec.js b/test/vitest/__tests__/components/common/VnLog.spec.js index 2dab02c34..6ecf57505 100644 --- a/test/vitest/__tests__/components/common/VnLog.spec.js +++ b/test/vitest/__tests__/components/common/VnLog.spec.js @@ -1,4 +1,4 @@ -import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { vi, describe, expect, it, beforeAll, afterEach, beforeEach } from 'vitest'; import { createWrapper, axios } from 'app/test/vitest/helper'; import VnLog from 'src/components/common/VnLog.vue'; @@ -10,9 +10,12 @@ describe('VnLog', () => { model: "Claim", }, }).vm; - vi.spyOn(axios, 'get').mockResolvedValue({ data: true }); }); + beforeEach(()=>{ + vi.spyOn(axios, 'get').mockResolvedValue({ data: true }); + }) + afterEach(() => { vi.clearAllMocks(); });