From 8dfc8d5c73ea462e89b47c8cf9de3cb0114a453d Mon Sep 17 00:00:00 2001 From: alexandre Date: Tue, 18 Apr 2023 14:50:25 +0200 Subject: [PATCH] refs #5357 mocked useRoute function --- test/vitest/__tests__/components/common/VnLog.spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/vitest/__tests__/components/common/VnLog.spec.js b/test/vitest/__tests__/components/common/VnLog.spec.js index 5d793e0ac..48785a800 100644 --- a/test/vitest/__tests__/components/common/VnLog.spec.js +++ b/test/vitest/__tests__/components/common/VnLog.spec.js @@ -10,11 +10,11 @@ describe('VnLog', () => { model: "Claim", }, }).vm; - vm.route = { - params: { - id: 1 - } - } + vi.mock('vue-router', () => ({ + useRoute: ()=>{ + return {params: {id: 1}} + }, + })); }); afterEach(() => {