mochainon

v2.0.0
Opitionated way to get up and running quickly with Mocha, Chai and Sinon
mocha chai sinon test

mochainon

npm version dependencies Build Status Build status

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:

$ 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:

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.

mochainon.chai

The powerfull assertion library Chai.

Plugins

This module also includes the following Chai plugins I use on a daily basis:

Tests

Run the test suite by doing:

$ gulp test

Contribute

Before submitting a PR, please make sure that coffeelint runs without any warning:

$ gulp lint

Support

If you're having any problem, please raise an issue on GitHub.

License

The project is licensed under the MIT license.

npm i mochainon

Metadata

  • MIT
  • Whatever
  • Juan Cruz Viotti
  • released 6/24/2017

Downloads

Maintainers