You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like jest.mock hoisting breaks as soon as jest is imported from @jest/globals
import {jest} from "@jest/globals";
import {foo} from './module1.js';
import {bar} from './module2.js';
jest.mock('./module1.js');
test fails, but if you remove jest import than jest.mock works fine
I assume jest.mock should be hoisted under import of jest/globals or jest/globals should be removed as an import since it should only provide types
The text was updated successfully, but these errors were encountered:
It looks like jest.mock hoisting breaks as soon as jest is imported from @jest/globals
import {jest} from "@jest/globals";
import {foo} from './module1.js';
import {bar} from './module2.js';
jest.mock('./module1.js');
test fails, but if you remove jest import than jest.mock works fine
I assume jest.mock should be hoisted under import of jest/globals or jest/globals should be removed as an import since it should only provide types
The text was updated successfully, but these errors were encountered: