Commit 2cf086c
committed
refactor(core): move ESM loader hooks to CLI-only path
The jest-runner instruments code through Jest's own transformer pipeline
and monkey-patches built-ins at runtime — it never uses the ESM loader
hooks. Extracted registerEsmLoaderHooks from registerInstrumentor,
called only from startFuzzing (the CLI entry point). hookRequire stays
in registerInstrumentor because custom hooks loaded via import() in
initFuzzing still need coverage instrumentation through require.extensions.1 parent a8db2b2 commit 2cf086c
2 files changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 240 | | |
244 | 241 | | |
| 242 | + | |
245 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| |||
0 commit comments