Open dschuessler opened 4 years ago
Steps to reproduce:
cd jest-bug-example && npm install && npx jest
package.json
jest
@jest-runner/electron
rm -rf node_modules/ && npm install && npx jest
Expected behavior: The test still passes.
Actual behavior: The test fails. The mock is undefined.
✕ electron mock (9 ms) ● Strip › electron mock expect(received).toBeDefined() Received: undefined 5 | describe("Strip", () => { 6 | test("electron mock", () => { > 7 | expect(app).toBeDefined(); | ^ 8 | }); 9 | }); 10 | at Object.<anonymous> (src/main/strip.test.ts:7:17) Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 6.846 s
Steps to reproduce:
cd jest-bug-example && npm install && npx jest
Notice the test passes.package.json
and raise either the version ofjest
to 25.0.0 or the version of@jest-runner/electron
to 3.0.0rm -rf node_modules/ && npm install && npx jest
Expected behavior: The test still passes.
Actual behavior: The test fails. The mock is undefined.