mirror of
https://github.com/directus/directus.git
synced 2026-02-15 14:54:56 -05:00
Test config (#122)
* Automatically reset / clear mocks between tests * Fix test for private view * Fix tooltip test * Fix router tests * Fix all other tests
This commit is contained in:
@@ -8,13 +8,11 @@ describe('API', () => {
|
||||
beforeAll(() => {
|
||||
globalThis.window = Object.create(window);
|
||||
Vue.use(VueCompositionAPI);
|
||||
jest.spyOn(auth, 'logout');
|
||||
jest.spyOn(auth, 'checkAuth');
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
(auth.logout as jest.Mock).mockClear();
|
||||
(auth.checkAuth as jest.Mock).mockClear();
|
||||
jest.spyOn(auth, 'logout');
|
||||
jest.spyOn(auth, 'checkAuth');
|
||||
});
|
||||
|
||||
it('Calculates the correct API root URL based on window', () => {
|
||||
|
||||
Reference in New Issue
Block a user