You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I might misconfigured the tsconfig or it is the issue with NYC that it is not working like this with typescript and any other configuration is needed to run NYC and get the code coverage of the typescript code.
One try was successful:
I just removed the type:module from package.json file
remove the extensions(.js) from test files.
test command is "test": "nyc mocha --require ts-node/register test-test/add.test.ts"
In this scenario it is working expected and giving 100% code coverage.
However the code I have given is the dummy code and it is given for better understanding, but in my actual app I can't remove type from the package.json.
so My expectation is I want some solution with type:module in the package.json.
The text was updated successfully, but these errors were encountered:
I have all the files are with .ts extension. My package.json file looks like
And the tsconfig file is:
Test file looks like:
Now when I run npm test, it is showing output as
I think I might misconfigured the tsconfig or it is the issue with NYC that it is not working like this with typescript and any other configuration is needed to run NYC and get the code coverage of the typescript code.
One try was successful:
"test": "nyc mocha --require ts-node/register test-test/add.test.ts"
In this scenario it is working expected and giving 100% code coverage.
However the code I have given is the dummy code and it is given for better understanding, but in my actual app I can't remove type from the package.json.
so My expectation is I want some solution with type:module in the package.json.
The text was updated successfully, but these errors were encountered: