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

TypeScript code coverage #2558

Closed
macsj200 opened this issue Aug 12, 2020 · 1 comment
Closed

TypeScript code coverage #2558

macsj200 opened this issue Aug 12, 2020 · 1 comment

Comments

@macsj200
Copy link

macsj200 commented Aug 12, 2020

Hello, I'm using ava with TypeScript and Istanbul nyc isn't returning any codecov information after running the test suite.

This is my ava config:

  "ava": {
    "failWithoutAssertions": false,
    "compileEnhancements": false,
    "files": [
      "test/unit/**/*.test.ts"
    ],
    "require": [
      "ts-node/register/transpile-only",
      "./test/unit/setup.ts"
    ],
    "extensions": [
      "ts"
    ]
  },

I'm using version 2.3.0.

This is what the nyc output looks like after invoking the test suite:
image

Obviously it's finding files and running tests but nyc doesn't seem to be picking it up.

This is the command I'm using to run the tests:
nyc ava --verbose

I'm also using the on-the-fly transpilation settings from this section https://nicedoc.io/avajs/ava/blob/master/docs/recipes/typescript.md#on-the-fly-compilation-using-ts-node because I couldn't get the alternative to work.

Thanks!

@macsj200
Copy link
Author

I was able to get it working with this configuration: andywer/ava-ts#7 (comment)

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

No branches or pull requests

1 participant