Temp fix for vite bug

This commit is contained in:
Sidharth Vinod
2022-08-27 12:57:22 +05:30
parent a1312fc095
commit a6dcabd4b7
+8 -1
View File
@@ -1,4 +1,11 @@
import matchers from '@testing-library/jest-dom/matchers';
import { expect } from 'vitest';
import { expect, beforeAll, vi } from 'vitest';
expect.extend(matchers);
// TODO: Remove once https://github.com/sveltejs/kit/issues/6259 is closed.
beforeAll(() => {
vi.mock('$app/env', () => ({
browser: 'window' in globalThis
}));
});