-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
fix: string //# sourceMappingURL=
breaking tests
#726
Comments
I think the source map util used by nyc does a string search for the comment pattern. It doesn't generate an AST for the file. If it's possible try breaking up the string, e.g. |
thank @novemberborn. yep, that's why I have done so far to work around it, however, I believe the parser can be improved to only catch '//# sourceMappingURL=' on the beginning of lines, etc. |
This is an upstream issue though, see thlorenz/convert-source-map#60. |
@novemberborn Haha, oh my that's NPM 😜 It feels like "The Twelve Tasks of Asterix". |
it seems this has now been fixed at thlorenz/convert-source-map@46a6c17 which sits under 1.5.1, so as long as nyc updates their dependencies, it's all good here as well. |
@zanona thanks for tracking down this upstream bug. |
Expected Behavior
Files containing the string
//# sourceMappingURL=
to be tested without breaking.Observed Behavior
Apparently, there's a bug 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.Bonus Points! Code (or Repository) that Reproduces Issue
Repro: https://github.com/zanona/ava-sourcemap-fail
Forensic Information
Operating System: the operating system you observed the issue on.
Environment Information: information about your project's environment, see instructions below:
The text was updated successfully, but these errors were encountered: