UNPKG

1.3 kBMarkdownView Raw
1# @tractor-plugins/mocha-specs
2
3Plugin for [**tractor**](https://github.com/TradeMe/tractor) for creating E2E tests with [**Mocha**](https://mochajs.org/).
4
5[![npm version](https://img.shields.io/npm/v/@tractor-plugins/mocha-specs.svg)](https://www.npmjs.com/package/@tractor-plugins/mocha-specs)
6
7## How to install
8
9```sh
10npm install @tractor-plugins/mocha-specs --dev
11```
12
13## Config
14
15```javascript
16// tractor.conf.js
17module.exports = {
18 // ...
19 mochaSpecs: {
20
21 },
22 // ...
23};
24```
25
26For more information [see here](./docs/configuration.md)
27
28## Development
29
30To set up development, just run `yarn` from the root of the repository. You can then run the following commands from within the directory, or use [`lerna run`](https://github.com/lerna/lerna/tree/master/commands/run) with [`--scope="@tractor-plugins/mocha-specs`](https://www.npmjs.com/package/@lerna/filter-options).
31
32### Build
33
34To build the whole package:
35
36```sh
37yarn build
38```
39
40### Test
41
42To run unit tests:
43
44```sh
45yarn test
46yarn cover # with coverage
47```
48
49To run end-to-end tests:
50
51```sh
52yarn tractor:test # in one tab
53yarn test:e2e # in another tab
54```
55
56To run end-to-end tests in CI mode:
57
58```sh
59yarn test:e2e:ci # handles the starting and killing of the application for testing
60```
61
62To start `tractor`:
63
64```sh
65yarn tractor
66```
\No newline at end of file