Open miparnisari opened 4 years ago
I've been trying for two days to get this library to work. I think we have to assume it is currently broken, since no issues seem to be getting resolved despite them having been reported months ago.
If I do this:
.pipe(mocha())
.pipe(
cover.report({
reporter: "json",
outFile: "testoutput.json",
})
);
at least it doesn't crash. But the result set seems to be empty. Also, they seem to indicate in the documention that the report action is deprecated, so that doesn't say much.
As users have noted in other issues, when you install it you get tons of warnings about deprecated libraries, so that doesn't augur well. It's a pity, because I was originally trying to use the Istanbul library, only to be told that it was out-of-date, and this was the latest thing.
I gave up on gulp-coverage and went back the the nyc library, which is where I started. I had some success with this:
gulp.task(
"coverage",
shell.task(["npx cross-env NODE_ENV=test nyc mocha test/**/*.js"])
);
I had to install the cross-env module. I at least get a print-out, but I haven't sorted out issues like instrumentation.
I can't see any way to use the nyc library in a fluent manner, so perhaps there isn't any. Also, I need to stop using the gulp.task syntax because it's obsolete.
This
gulpfile
:When I run
gulp test
I getAny ideas on how to fix this?