1 | # @tractor-plugins/mocha-specs
|
2 |
|
3 | Plugin for [**tractor**](https://github.com/TradeMe/tractor) for creating E2E tests with [**Mocha**](https://mochajs.org/).
|
4 |
|
5 | [![Greenkeeper badge](https://badges.greenkeeper.io/phenomnomnominal/tractor-plugin-mocha-specs.svg)](https://greenkeeper.io/)
|
6 | [![npm version](https://img.shields.io/npm/v/@tractor-plugins/mocha-specs.svg)](https://www.npmjs.com/package/@tractor-plugins/mocha-specs)
|
7 | [![Code Climate](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-mocha-specs/badges/gpa.svg)](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-mocha-specs)
|
8 | [![Test Coverage](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-mocha-specs/coverage.svg)](https://codeclimate.com/github/phenomnomnominal/tractor-plugin-mocha-specs/coverage)
|
9 |
|
10 | ## How to install
|
11 |
|
12 | ```sh
|
13 | npm install @tractor-plugins/mocha-specs --dev
|
14 | ```
|
15 |
|
16 | ## Config
|
17 |
|
18 | ```javascript
|
19 | // tractor.conf.js
|
20 | module.exports = {
|
21 | // ...
|
22 | mochaSpecs: {
|
23 |
|
24 | },
|
25 | // ...
|
26 | };
|
27 | ```
|
28 |
|
29 | For more information [see here](./docs/configuration.md)
|
30 |
|
31 | ## Development
|
32 |
|
33 | To set up development:
|
34 |
|
35 | ```sh
|
36 | npm install # install dependencies
|
37 | npm run dev # link dependencies
|
38 | tractor init
|
39 | ```
|
40 |
|
41 | To run plugin:
|
42 |
|
43 | ```sh
|
44 | npm run tractor:test # in one tab
|
45 | npm run tractor # in another tab
|
46 | ```
|
47 |
|
48 | To run tests:
|
49 |
|
50 | ```sh
|
51 | npm run tractor:test # in one tab
|
52 | npm run test:e2e # in another tab
|
53 | ```
|