Assuming you are testing via mocha
, you have to run your tests using the mocha
command instead of the node
executable.
So if you haven’t already, make sure you do npm install mocha -g
. Then just run mocha
in your project’s root directory.
More Related Contents:
- No ‘Access-Control-Allow-Origin’ – Node / Apache Port Issue
- Allow CORS REST request to a Express/Node.js application on Heroku
- How to implement a secure REST API with node.js
- TypeError: db.collection is not a function
- Test process.env with Jest
- passport.js RESTful auth
- Proper request with async/await in Node.JS
- How do I run a node.js app as a background service?
- Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
- How to change node.js’s console font color?
- Grunt watch error – Waiting…Fatal error: watch ENOSPC
- Node.js – get raw request body using Express
- Global Variable in app.js accessible in routes?
- Express.js routing: optional splat param?
- Stream from a mongodb cursor to Express response in node.js
- Decrypting AES256 with node.js returns wrong final block length
- How to verify FCM registration token on server?
- npm ERR! network getaddrinfo ENOTFOUND
- Express doesn’t set a cookie
- How to setup an authentication middleware in Express.js
- How to server specifc static files with express.js
- Automatically start forever (node) on system restart
- Parsing a CSV file using NodeJS [closed]
- Differences between express.Router and app.get?
- How to restore/reset npm configuration to default values?
- Angularjs $http does not seem to understand “Set-Cookie” in the response
- How do I override nested dependencies with `yarn`?
- “Please try running this command again as Root/Administrator” error when trying to install LESS
- Testing REST webservices [closed]
- Unable to deploy React JS application on Azure App service