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

@@ -6,14 +6,14 @@ import { assertActiveElement, assertTabs, getByText, getTabs } from "$lib/test-u
import { click, Keys, press, shift } from "$lib/test-utils/interactions";
import Button from "$lib/internal/elements/Button.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)