Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nyc ignores files ending with -test.ts #1545

Open
ericmorand opened this issue Jan 18, 2024 · 0 comments
Open

nyc ignores files ending with -test.ts #1545

ericmorand opened this issue Jan 18, 2024 · 0 comments

Comments

@ericmorand
Copy link

ericmorand commented Jan 18, 2024

Link to bug demonstration repository

Twing is plagued by this issue: we have a module named src/lib/helpers/get-test.ts which contains the getTest helper method that returns a Twing test from its name. This is not a test file, we did not ask it to be ignored but still it is missing from the report: https://coveralls.io/builds/65055920

Renaming it to get-foo.ts restores its presence in the report.

Interestingly enough, we also have a file named src/lib/node/expression/call/test.ts and it is not ignored.

I don't think I understand why nyc is ignoring files by itself. We already include files, so it is unclear why nyc assumes that we want to ignore certain files that are among those that we explicitly include.

Expected Behavior

Files ending with -test.ts are not ignored.

Observed Behavior

Files ending with -test.ts are ignored.

Environment Information

  System:
    OS: Linux 6.5 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 18.50 GB / 31.07 GB
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
  npmPackages:
    typescript: ^5.2.2 => 5.3.3 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant