connor4312 / connor4312/nodejs-testing

Test coverage, typescript and tsx

Open
#38 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
67
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hey, I'm trying the new code coverage feature, first of all, thank you for the work.

It doesn't work for me, I don't know if I'm missing some configuration. Currently using this configuration:

```
{
"nodejs-testing.extensions": [
{
"extensions": ["mjs", "cjs", "js"],
"parameters": []
},
{
"extensions": ["mts", "cts", "ts"],
"parameters": ["--import", "tsx"]
}
]
}

```

Everything works well except test coverage, I only have this that appears:

Screenshot 2024-05-12 at 19 17 48

And everthing shows up as 100%:

Screenshot 2024-05-12 at 19 18 43

So it looks like something does not work. When I run the following command by hand:

```bash
node --test --enable-source-maps --experimental-test-coverage --import tsx $(find src -name '*.test.ts')
```

I obtain:

Screenshot 2024-05-12 at 19 19 47

So the node test runner seems to recognise my files.

Are you aware of such a thing? Can I help you with identifying the root cause?

Thank you for your time and have a nice day

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.