-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# About Mocha's Tests | ||
|
||
- **All assertions should be made using [unexpected](http://unexpected.js.org)**, unless there's a good reason not to. Exceptions include: | ||
- Testing diff output. Mocha generates diff output unless the assertion library decides to do this itself. Since `unexpected` generates its *own* diff output, we need to use an assertion library that does not; we use the built-in `assert` module. | ||
- Tests assertion interop with other specific assertion libraries. | ||
- All tests have extension `.spec.js`. | ||
- All test fixtures have extension `.fixture.js`. | ||
- All test fixtures are *ignored* by ESLint. | ||
- `mocha.opts` will require `test/setup.js`, which is the main harness. | ||
- `test/assertions.js` contains Mocha-specific types and assertions for `unexpected` | ||
- `test/node-unit/` only runs in Node.js; `test/browser-specific/` only runs in the browser. | ||
- See `../karma.conf.js` for more information on which tests run in the browser. | ||
- We can't run all of the Node.js tests in one `mocha` command, because we need to use different command-line options to test the various reporters and interfaces. | ||
- See `../package-scripts.js` for more info about how things are split up. |