diff --git a/src/__tests__/auto-cleanup.test.js b/src/__tests__/auto-cleanup.test.js index 803001e..7962925 100644 --- a/src/__tests__/auto-cleanup.test.js +++ b/src/__tests__/auto-cleanup.test.js @@ -1,8 +1,13 @@ import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest' -const globalAfterEach = vi.fn() +import { IS_JEST } from './utils.js' + +// TODO(mcous, 2024-12-08): clearing module cache and re-importing +// in Jest breaks Svelte's environment checking heuristics. +// Re-implement this test in a more accurate environment, without mocks. +describe.skipIf(IS_JEST)('auto-cleanup', () => { + const globalAfterEach = vi.fn() -describe('auto-cleanup', () => { beforeEach(() => { vi.resetModules() globalThis.afterEach = globalAfterEach