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 instrument should resolve source filenames. #1014

Closed
coreyfarrell opened this issue Mar 7, 2019 · 1 comment
Closed

nyc instrument should resolve source filenames. #1014

coreyfarrell opened this issue Mar 7, 2019 · 1 comment

Comments

@coreyfarrell
Copy link
Member

Create ./somefile.js then run nyc instrument somefile.js. The instrumented code produces coverage data for the filename 'somefile.js' when it really should be producing coverage for path.resolve('somefile.js'). This causes oddness in reporting when combining pre-instrumented code with code that nyc instruments on the fly (during execution).

CC @AndrewFinlay

@AndrewFinlay
Copy link
Contributor

Good to see this issue resolved, it was biting me in the instrument --cwd changes. I had to jump through hoops to get that test to pass. Dropping that requirement should make for a much cleaner implementation.

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

2 participants