Fix tests after introduction of babel step

This commit is contained in:
Ryan Gossiaux
2021-12-30 09:56:22 -10:00
parent 809cf84164
commit 2b705fd1ae
7 changed files with 23 additions and 23 deletions

View File

@@ -46,14 +46,14 @@ import Button from "$lib/internal/elements/Button.svelte";
import Div from "$lib/internal/elements/Div.svelte";
import Span from "$lib/internal/elements/Span.svelte";
let id = 0;
let mockId = 0;
jest.mock('../../hooks/use-id', () => {
return {
useId: jest.fn(() => ++id),
useId: jest.fn(() => ++mockId),
}
})
beforeEach(() => id = 0)
beforeEach(() => mockId = 0)
beforeAll(() => {
// jest.spyOn(window, 'requestAnimationFrame').mockImplementation(setImmediate as any)
// jest.spyOn(window, 'cancelAnimationFrame').mockImplementation(clearImmediate as any)