(moduleId)
| 15 | const moduleIdRepeat = require.resolve('../fixtures/source-map/no-throw2.js'); |
| 16 | |
| 17 | function run(moduleId) { |
| 18 | require(moduleId); |
| 19 | delete require.cache[moduleId]; |
| 20 | const idx = module.children.findIndex((child) => child.id === moduleId); |
| 21 | assert.ok(idx >= 0); |
| 22 | module.children.splice(idx, 1); |
| 23 | |
| 24 | // Verify that the source map is still available |
| 25 | assert.notStrictEqual(findSourceMap(moduleId), undefined); |
| 26 | } |
| 27 | |
| 28 | // Run the test in a function scope so that every variable can be reclaimed by GC. |
| 29 | run(moduleId); |
no test coverage detected