Comments (8)
You need to do:
$ ./node_modules/.bin/nyc
Note the dot (.
) in front of bin
.
from nyc.
https://docs.npmjs.com/files/folders#executables
from nyc.
@tcurdt I think it would be worthwhile for us to update the documentation with some additional examples that demonstrate installing, and instrumenting your code with nyc.
from nyc.
Fair enough:
$ ./node_modules/.bin/nyc tap ./test/*.js
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn tap ENOENT
at exports._errnoException (util.js:874:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:439:9)
at process._tickCallback (node.js:353:17)
at Function.Module.runMain (module.js:469:11)
at startup (node.js:134:18)
at node.js:961:3
from nyc.
What works: ./node_modules/.bin/nyc npm test
from nyc.
$ ./node_modules/.bin/nyc ./node_modules/.bin/tap test/*.js
Or you can install nyc
and/or tap
with the -g
option.
from nyc.
./node_modules/.bin/nyc ./node_modules/.bin/tap test/*.js
should go into the docs.
from nyc.
FWIW I tend to use $(npm bin)/nyc
and the likes for locally installed dependencies.
from nyc.
Related Issues (20)
- Jest and Cypress's coverage merged results is wrong
- nyc should use nodejs module customization hooks rather than monkey patching
- Node v20: TypeError [ERR_INVALID_ARG_TYPE]: The "code" argument must be of type number. Received type string ('128SIGINT') HOT 5
- Is there any way to extract/remove Babel from NYC?
- How to use nyc with TypeScript and ESM? HOT 1
- fix: merging two coverage reports for same source file causes crash HOT 1
- NYC checkCoverage doesn't have a way to throw error when insufficient coverage met
- nyc test coverage on branches is not accurate - Seems to be happening with nyc@v15, [email protected] and [email protected] HOT 6
- Code coverage is not instrumenting React components (React Native)
- Code rewriting breaks function name inferencing HOT 1
- nyc not working with project type module (esm) HOT 1
- nyc ignores files ending with `-test.ts`
- Unable to get coverage for files executed via runInThisContext HOT 1
- Markdown reporter HOT 1
- Is there a way to filter files in the stage `nyc report` ?
- Merging with nyc storybook test coverage with other reports generated by coverageProvider 'istanbul' result in wrong coverage HOT 2
- Issue with Instrumentation of Code Coverage for my Angular V17 Project
- is it possible to store nyc output with relative path?
- cccccbgvrekrbvdtukvnhiffetjntbbuuijkfblietjr
- Use of deprecated glob and rimraf dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nyc.