-
-
Couldn't load subscription status.
- Fork 260
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Using the latest happy-dom releases and jest 30.2 I am receiving an error.
TypeError: Cannot read properties of undefined (reading 'bind')
at node_modules/.pnpm/[email protected]/node_modules/happy-dom/src/async-task-manager/AsyncTaskManager.ts:8:44
Expected behavior
No error.
Additional context
I was able to work around the error by filling in the globalThis via a jest setup file
import * as nodeTimers from 'node:timers';
import { jest } from '@jest/globals';
const globalRef = globalThis;
if (typeof globalRef.clearImmediate !== 'function') {
globalRef.clearImmediate = nodeTimers.clearImmediate;
}
jest.useFakeTimers();
I suspect it will need to be added back like setImmediate https://github.com/capricorn86/happy-dom/blob/master/packages/%40happy-dom/jest-environment/src/index.ts#L99
Spixmaster
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working