Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
I have a test file that uses mock-fs which is a package that mocks a filesystem for testing with Node. I wanted to use Codecov with my repo but I could not. Everything was showing OK, I could see that stats being generated on my local machine as well as on Jenkins. But it did not generate any files.
This is what I did to resolve it (where I set NODE_ENV === 'test' on Jenkins):
var fsMock = process.env.NODE_ENV === 'test' ? function() {} : require('mock-fs');
The drawback is that now a file is actually created on the Jenkins machine after every run, but I can live with that.
I have a test file that uses
mock-fs
which is a package that mocks a filesystem for testing with Node. I wanted to use Codecov with my repo but I could not. Everything was showing OK, I could see that stats being generated on my local machine as well as on Jenkins. But it did not generate any files.This is what I did to resolve it (where I set
NODE_ENV === 'test'
on Jenkins):var fsMock = process.env.NODE_ENV === 'test' ? function() {} : require('mock-fs');
The drawback is that now a file is actually created on the Jenkins machine after every run, but I can live with that.
My question is: What could be causing this?