UNPKG

1.46 kBMarkdownView Raw
1Atom-Mocha
2==========
3
4Run 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
10Installation
11------------
12Run `npm install atom-mocha --save-dev` in your package's directory.
13
14If 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
18If you're still experiencing difficulties, [please file an issue](https://github.com/Alhadis/Atom-Mocha/issues).
19
20
21
22Configuration
23-------------
24To pass options to Mocha, place a [`mocha.opts`](https://mochajs.org/#mochaopts) file in your package's specs directory.
25Alternatively, you can use `package.json` instead:
26
27~~~json
28"atom-mocha": {
29 "mocha": {
30 "bail": true,
31 "ui": "bdd"
32 }
33}
34~~~
35
36For details on Mocha's configuration settings, [consult their documentation](https://mochajs.org/#usage).
37Options specific to this spec-runner are [described in depth here](docs/options.md).
38
39
40
41Reminders
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.