Test suite failed to run
This message shows up in 2 different situations. Pick the one that matches yours:
- In a Heft/SPFx project jest.mock() doesn't hoist — and sp-http drags in a missing MS-internal moduleTests run over pre-compiled lib-commonjs without Babel, so a mock written below the imports lands after require; write it above the imports or use moduleNameMapper (and why only some sp-http suites die on @msinternal/ecs-flight)Cause and fix →
- TextEncoder is not defined before your first test runs — a dependency needs it at import time and jsdom does not have itjsdom has no Encoding API and a dependency that builds new TextEncoder() at module level dies on import, before beforeAll; import a polyfill module first or use setupFiles, and make the dependency lazyCause and fix →