1.5.0 • Published 9 years ago

astro-mocha v1.5.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

astro-mocha

astro module that provides mocha test running

USAGE

$cd myProject
myProject$ astro mocha

Assumptions

astro-mocha expects to find specs in '/test' directory from the context where the astro command is executed. In the above example, astro-mocha will run all spec files within /myProject/test directory recursively.

Options

Any 'global' options listed below are only global to the testing context, they do not impact your application beyond test running

--chai

Adds chai, chai.expect, chai.should, and chai.assert to the global for testing. No need to include chai into your project's dev dependencies or require it in, in each spec file.

global.chai = require('chai');
global.expect = chai.expect;
global.should = chai.should;
global.assert = chai.assert;

--sinon

Adds sinon, and if --chai is specified, will add sinon-chai to the global chai implmentation.

global.sinon = require('sinon');

--proxyquire

Adds proxyquire to the global for testing. No need to include proxyquire into your project's dev dependencies or require it in, in each spec file.

global.proxyquire = require('proxyquire');

--babel

Adds babel transpilation compiler option

mocha --compilers js:babel/register

Want more globals or additional options?

Submit a PR or open an issue

1.5.0

9 years ago

1.4.0

9 years ago

1.3.7

9 years ago

1.3.6

9 years ago

1.3.5

9 years ago

1.3.4

9 years ago

1.3.3

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

1.0.0

9 years ago