test(VnTable): refs #8197 mock useFilterParams
gitea/salix-front/pipeline/pr-beta This commit looks good Details

This commit is contained in:
Alex Moreno 2024-12-18 13:16:45 +01:00
parent 32fd07dd14
commit 8c3c318099
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { describe, expect, it, beforeAll, beforeEach } from 'vitest'; import { describe, expect, it, beforeAll, beforeEach, vi } from 'vitest';
import { createWrapper } from 'app/test/vitest/helper'; import { createWrapper } from 'app/test/vitest/helper';
import VnTable from 'src/components/VnTable/VnTable.vue'; import VnTable from 'src/components/VnTable/VnTable.vue';
@ -13,6 +13,15 @@ describe('VnTable', () => {
}, },
}); });
vm = wrapper.vm; vm = wrapper.vm;
vi.mock('src/composables/useFilterParams', () => {
return {
useFilterParams: vi.fn(() => ({
params: {},
orders: {},
})),
};
});
}); });
beforeEach(() => (vm.selected = [])); beforeEach(() => (vm.selected = []));