Use this:
mocha server-test
Or if you have subdirectories use this:
mocha "server-test/**/*.js"
Note the use of double quotes. If you omit them you may not be able to run tests in subdirectories.
More Related Contents:
- How to Unit Test React-Redux Connected Components?
- joining tests from multiple files with mocha.js
- Mocha / Chai expect.to.throw not catching thrown errors
- What’s the difference between faking, mocking, and stubbing?
- What is the difference between integration and unit tests?
- How deep are your unit tests?
- When should I mock?
- Should unit tests be written for getter and setters?
- NUnit vs. MbUnit vs. MSTest vs. xUnit.net [closed]
- Unit test naming best practices [closed]
- How to start working with GTest and CMake
- How do I unit-test saving file to the disk?
- How to RowTest with MSTest?
- How to terminate a program when it crashes? (which should just fail a unit test instead of getting stuck forever)
- Mocking $modal in AngularJS unit tests
- How does mockito when() invocation work?
- How to test Spring Data repositories?
- Is there a way to get Chai working with asynchronous Mocha tests?
- RSpec vs Cucumber (RSpec stories) [closed]
- How to authenticate Supertest requests with Passport?
- How can I unit test a GUI?
- Any way to test EventEmitter in Angular2?
- Mocking database in node.js?
- Using Maven, how do I run specific tests?
- Mocking AngularJS module dependencies in Jasmine unit tests
- Angular 2 Unit Tests: Cannot find name ‘describe’
- Writing “unit testable” code?
- How do I trigger a keyup/keydown event in an angularjs unit test?
- Why should unit tests test only one thing?
- Testing asynchronous function with mocha