1 | Atom-Mocha
|
2 | ==========
|
3 |
|
4 | Run package specs in [Atom](https://atom.io/) using [Mocha](https://mochajs.org/) and [Chai](http://chaijs.com/).
|
5 |
|
6 | <img src="https://raw.githubusercontent.com/Alhadis/Atom-Mocha/static/preview.png" width="657" alt="Preview" />
|
7 |
|
8 |
|
9 |
|
10 | Installation
|
11 | ------------
|
12 | Run `npm install atom-mocha --save-dev` in your package's directory.
|
13 |
|
14 | If nothing's happening:
|
15 | * Check your `package.json` file contains `"atomTestRunner": "atom-mocha"`
|
16 | * Atom may have cached your package's metadata. Refresh it by quitting and restarting the program.
|
17 |
|
18 | If you're still experiencing difficulties, [please file an issue](https://github.com/Alhadis/Atom-Mocha/issues).
|
19 |
|
20 |
|
21 |
|
22 | Configuration
|
23 | -------------
|
24 | To pass options to Mocha, place a [`mocha.opts`](https://mochajs.org/#mochaopts) file in your package's specs directory.
|
25 | Alternatively, you can use `package.json` instead:
|
26 |
|
27 | ~~~json
|
28 | "atom-mocha": {
|
29 | "mocha": {
|
30 | "bail": true,
|
31 | "ui": "bdd"
|
32 | }
|
33 | }
|
34 | ~~~
|
35 |
|
36 | For details on Mocha's configuration settings, [consult their documentation](https://mochajs.org/#usage).
|
37 | Options specific to this spec-runner are [described in depth here](docs/options.md).
|
38 |
|
39 |
|
40 |
|
41 | Reminders
|
42 | ---------
|
43 | * Chai's [expect](http://chaijs.com/api/bdd/) function is automatically globalised for you.
|
44 | * [Nifty extras are available](docs/extensions.md) to help with writing tests.
|
45 | * Reload the spec-runner window by pressing <kbd>Ctrl/Cmd + R</kbd>.
|
46 | * Tests can be batch-toggled by <kbd>Alt</kbd>-clicking their title.
|