tschaub / mock-fs

Configurable mock for the fs module
https://npmjs.org/package/mock-fs
Other
906 stars 85 forks source link

not working when npm test is launched #274

Closed rcruzper closed 5 years ago

rcruzper commented 5 years ago

Hi,

I'm mocking a file with mock-fs and when I run the mocha command the tests are working but when I run npm test it seems that the mock is being ignored.

package.json:

"scripts": {
    "pretest": "eslint .",
    "test": "nyc mocha \"./test/**/*.test.js\" --exit",
    "coverage": "nyc report --reporter=text-lcov | coveralls"
  }

Anyone knows what could it be happening?

Kind regards.