Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/__tests__/filterHelper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ describe.each([
});

test('Test non implemented filter is skipped with warning', () => {
const warn = vi.fn();
global.console.warn = warn;
const warn = vi.spyOn(console, 'warn');
expect(applyFilters([
{
'field': 'banana',
Expand Down Expand Up @@ -559,8 +558,7 @@ describe.each([
});

test('test date filter DateRange skipped when value not implemented', () => {
const error = vi.fn();
global.console.error = error;
const error = vi.spyOn(console, 'error');
expect(
applyFilters([
{
Expand Down Expand Up @@ -640,8 +638,7 @@ describe.each([
});

test('test childAttr filter is skipped when no data is set', () => {
const warn = vi.fn();
global.console.warn = warn;
const warn = vi.spyOn(console, 'warn');
expect(
applyFilters([
{
Expand Down Expand Up @@ -690,8 +687,7 @@ describe.each([
});

test('test childArrayAttr filter is skipped when no data set', () => {
const warn = vi.fn();
global.console.warn = warn;
const warn = vi.spyOn(console, 'warn');
expect(
applyFilters([
{
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default defineConfig({
reportsDirectory: './reports',
},
outputFile: 'reports/unit.test.xml',
restoreMocks: true,
},
});