# @gagarinjs/mocha-cli

> A tool for connecting to Gagarin's mocha test driver

Latest version **0.6.0** (published 2018-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gagarinjs/mocha-cli
pnpm add @gagarinjs/mocha-cli
yarn add @gagarinjs/mocha-cli
bun add @gagarinjs/mocha-cli
```

Provides the command `gagarin-mocha-cli`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2018-10-10 |
| First published | 2017-04-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | apendua |
| Maintainers | apendua |
| Keywords | gagarin, testing, mocha, meteor, reporter |

## Links

- npm: https://www.npmjs.com/package/@gagarinjs/mocha-cli
- Repository: https://github.com/gagarinjs/meteor-mocha
- Homepage: https://github.com/gagarinjs/meteor-mocha#readme
- Issues: https://github.com/gagarinjs/meteor-mocha/issues
- npm.io page: https://npm.io/package/@gagarinjs/mocha-cli

## Dependencies (6)

- [asteroid](https://npm.io/package/asteroid.md) ^2.0.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [cli-clear](https://npm.io/package/cli-clear.md) ^1.0.4
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.6
- [lodash.assign](https://npm.io/package/lodash.assign.md) ^4.2.0
- [faye-websocket](https://npm.io/package/faye-websocket.md) ^0.11.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.6.0 (latest) — 2018-10-10
- 0.5.2 — 2018-07-31
- 0.5.1 — 2018-07-31
- 0.0.5 — 2017-09-18
- 0.0.4 — 2017-09-15
- 0.0.3 — 2017-08-11
- 0.0.2 — 2017-08-11
- 0.0.1 — 2017-04-03

## README

![logo](https://s3.amazonaws.com/gagarinjs/assets/gagarinLogo.svg)

# meteor-mocha

This repository contains a set of packages to help writing mocha tests in Meteor environment.

## Quick start

```
meteor npm install --save-dev mocha
meteor add gagarin:mocha-driver
meteor add gagarin:mocha-reporter
meteor test --driver-package gagarin:mocha-driver
```
Please note that you need to add `mocha` manually. This is a good, because you can use whatever
version of `mocha` you want.


To add some tests, simply put them in `*.test(s).js` files somewhere in your project, e.g.
```javascript
describe('The simplest possible test suite', function () {
  it('should be ok', function () {
    // ...
  });
});
```
You can now see the tests results at http://localhost:3000. As you will see we are using in browser terminal
to show the results, which means that you can use whatever mocha reporter you like the most, e.g.

http://localhost:3000/?reporter=nyan

![preview](https://s3.amazonaws.com/gagarinjs/assets/gagarinMochaPreview.gif)

## Using with the cli tool

You you don't feel like watching the tests results in your browser, and instead you prefer to
have all of them printed in a terminal, you can use `gagarin-mocha-cli`.
```
npm install -g @gagarinjs/mocha-cli
```
Then run
```
gagarin-mocha-cli
```
in your project root. By default `gagarin-mocha-cli` will spawn `meteor` process in the background and will connect to it to grab tests results. See `gagarin-mocha-cli --help`,
for all available options. For continous integration you will probably want to use
```
gagarin-mocha-cli --once --reports-only --reporter <reporter>
```

---
_Source: https://npm.io/package/@gagarinjs/mocha-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
