# mochainon

> Opitionated way to get up and running quickly with Mocha, Chai and Sinon

Latest version **2.0.0** (published 2017-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install mochainon
pnpm add mochainon
yarn add mochainon
bun add mochainon
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2017-06-24 |
| First published | 2015-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Juan Cruz Viotti |
| Maintainers | jviotti |
| Keywords | mocha, chai, sinon, test |

## Links

- npm: https://www.npmjs.com/package/mochainon
- Repository: https://github.com/jviotti/mochainon
- Issues: https://github.com/jviotti/mochainon/issues
- npm.io page: https://npm.io/package/mochainon

## Dependencies (8)

- [chai](https://npm.io/package/chai.md) ^4.0.2
- [sinon](https://npm.io/package/sinon.md) ^2.3.5
- [sinon-chai](https://npm.io/package/sinon-chai.md) ^2.8.0
- [chai-string](https://npm.io/package/chai-string.md) ^1.1.2
- [chai-things](https://npm.io/package/chai-things.md) ^0.2.0
- [chai-datetime](https://npm.io/package/chai-datetime.md) ^1.4.0
- [chai-interface](https://npm.io/package/chai-interface.md) ^2.0.2
- [chai-as-promised](https://npm.io/package/chai-as-promised.md) ^7.0.0

## 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

- 2.0.0 (latest) — 2017-06-24
- 1.0.0 — 2015-06-18

## README

mochainon
---------

[![npm version](https://badge.fury.io/js/mochainon.svg)](http://badge.fury.io/js/mochainon)
[![dependencies](https://david-dm.org/jviotti/mochainon.png)](https://david-dm.org/jviotti/mochainon.png)
[![Build Status](https://travis-ci.org/jviotti/mochainon.svg?branch=master)](https://travis-ci.org/jviotti/mochainon)
[![Build status](https://ci.appveyor.com/api/projects/status/378fir7wca9d9j77?svg=true)](https://ci.appveyor.com/project/jviotti/mochainon)

Opitionated way to get up and running quickly with Mocha, Chai and Sinon.

Why?
----

I found myself doing the same time consuming pattern requiring Mocha, Sinon, Chai and various plugins.

This is an attempt to save a minute of my life every time I create a test file.

Future
------

In the future, I intend to keep extending this module with custom chai helpers and other goodies that can reduce the time I spend unit testing.

Installation
------------

Install `mochainon` as a development dependency by running:

```sh
$ npm install --save-dev mochainon
```

Usage
-----

I recommend requiring this module as a single letter variable, like `m`, and use it's functionality from there.

Example:

```coffee
m = require('mochainon')
describe 'My Spec', ->

	it 'should pass', ->
		m.expect(true).to.be.true
```

Documentation
-------------

The module exposes the following objects:

### mochainon.sinon

The awesome spies, stubs and mocks library [SinonJS](http://sinonjs.org).

### mochainon.chai

The powerfull assertion library [Chai](http://chaijs.com).

## Plugins

This module also includes the following [Chai](http://chaijs.com) plugins I use on a daily basis:

- [sinon-chai](https://github.com/domenic/sinon-chai).
- [chai-as-promised](https://github.com/domenic/chai-as-promised/).
- [chai-things](http://chaijs.com/plugins/chai-things).
- [chai-interface](http://chaijs.com/plugins/chai-interface).
- [chai-datetime](http://chaijs.com/plugins/chai-datetime).
- [chai-string](http://chaijs.com/plugins/chai-string).

Tests
-----

Run the test suite by doing:

```sh
$ gulp test
```

Contribute
----------

- Issue Tracker: [github.com/jviotti/mochainon/issues](https://github.com/jviotti/mochainon/issues)
- Source Code: [github.com/jviotti/mochainon](https://github.com/jviotti/mochainon)

Before submitting a PR, please make sure that [coffeelint](http://www.coffeelint.org/) runs without any warning:

```sh
$ gulp lint
```

Support
-------

If you're having any problem, please [raise an issue](https://github.com/jviotti/mochainon/issues/new) on GitHub.

License
-------

The project is licensed under the MIT license.

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