astro-mocha
astro module for running mocha tests
Last updated 5 years ago by collinestes .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install astro-mocha 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.5.0                                ...           latest (5 years ago)

16 Versions

  • 1.5.0                                ...           5 years ago
  • 1.4.0                                ...           5 years ago
  • 1.3.7                                ...           5 years ago
  • 1.3.6                                ...           5 years ago
  • 1.3.5                                ...           5 years ago
  • 1.3.4                                ...           5 years ago
  • 1.3.3                                ...           5 years ago
  • 1.3.2                                ...           5 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Downloads
Today 0
This Week 1
This Month 6
Last Day 0
Last Week 3
Last Month 7
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |