#7068: Created VnVisibleColumns test #1250
|
@ -1,4 +1,4 @@
|
||||||
import { describe, expect, it, beforeEach, vi } from 'vitest';
|
import { describe, expect, it, beforeEach, afterEach, vi } from 'vitest';
|
||||||
import { createWrapper } from 'app/test/vitest/helper';
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
import VnVisibleColumn from '../VnVisibleColumn.vue';
|
import VnVisibleColumn from '../VnVisibleColumn.vue';
|
||||||
import { axios } from 'app/test/vitest/helper';
|
import { axios } from 'app/test/vitest/helper';
|
||||||
|
@ -17,6 +17,10 @@ describe('VnVisibleColumns', () => {
|
||||||
vm = wrapper.vm;
|
vm = wrapper.vm;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
vi.clearAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
describe('setUserConfigViewData()', () => {
|
describe('setUserConfigViewData()', () => {
|
||||||
it('should initialize localColumns with visible configuration', () => {
|
it('should initialize localColumns with visible configuration', () => {
|
||||||
columnsMock = [
|
columnsMock = [
|
||||||
|
@ -112,8 +116,6 @@ describe('VnVisibleColumns', () => {
|
||||||
},
|
},
|
||||||
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
mockAxiosPost.mockRestore();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Está bien y aunque solo hay 1 es correcto
Pero todavia mejor si lo metemos dentro de un afterEach y usamo vi.clearAllMocks();
afterEach(() => { vi.clearAllMocks(); });
Estariamos usando el standard en todos los tests