Friday 5 May 2017

Error with npm test but not mocha test node.js

I am working with node.js and mocha unit testing and I want to be able to run the test command through npm. When I run mocha test in my tests folder, the test runs sucessfully. However, when I run npm test, the test gives me an error.

enter image description here

Here is a snippet from my package.json:

  "scripts": {
    "test": "./tests/test.js"
  },

Anyone know why the npm test would give me an error but mocha test runs just fine?

Thanks



via s_kirkiles

No comments:

Post a Comment