Invalid coverage with `--experimental-monocart` when using `ts-node`
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
All metrics of coverage report are incorrectly set to 100% when using `--experimental-monocart` with `ts-node`.
Repro, make sure you download the project locally as WebContainers do not support V8 coverage/CDP: https://stackblitz.com/~/edit/c8-ts-node-invalid-monocart
```sh
$ pnpm test
------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
All files | 76.47 | 25 | 100 | 76.47 |
example.ts | 76.47 | 25 | 100 | 76.47 | 3-4,13-14
------------|---------|----------|---------|---------|-------------------
$ pnpm test:monocart
------------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
example.ts | 100 | 100 | 100 | 100 |
------------|---------|----------|---------|---------|-------------------
```
Contributor guide
Assessment
This issue has not been assessed yet.