bcoe / bcoe/c8

Invalid coverage with `--experimental-monocart` when using `ts-node`

Open
#561 6 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.