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
Apparently, there's a bug on AVA when used with nyc for testing where files containing a string with the initial part of a sourcemap instruction, i.e: //# sourceMappingURL=, will fail to generate code coverage as well as being tested.
For bug reports, please provide as much relevant info as possible.
const{test}=require('ava'),someFn=require('../');test.todo('some fn with hardcoded the sourcemap string');
Error Message & Stack Trace
$ nyc ava -v
Transformation error for /Users/zanona/Desktop/ava-sourcemaps-fail/index.js ; return original code
An error occurred while trying to read the map file at /Users/zanona/Desktop/ava-sourcemaps-fail/${src}\n`;
Error: ENOENT: no such file or directory, open '/Users/zanona/Desktop/ava-sourcemaps-fail/${src}\n`;'
- some fn with hardcoded the sourcemap string
0 tests passed
1 test todo
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | Unknown | Unknown | Unknown | Unknown | |
----------|----------|----------|----------|----------|----------------|
✨ Done in 1.56s.
Command-Line Arguments
Copy your npm build scripts or the ava command used:
Description
Apparently, there's a bug on AVA when used with
nyc
for testing where files containing a string with the initial part of a sourcemap instruction, i.e://# sourceMappingURL=
, will fail to generate code coverage as well as being tested.For bug reports, please provide as much relevant info as possible.
Test Source
index.js
test/index.js
Error Message & Stack Trace
Command-Line Arguments
Copy your npm build scripts or the
ava
command used:Relevant Links
Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:
The text was updated successfully, but these errors were encountered: