3.0.1 • Published 7 years ago

mycha v3.0.1

Weekly downloads
169
License
MIT
Repository
github
Last release
7 years ago

Build Status Dependency Status YARN compatibility

/'maɪ.kɑː/

A thin wrapper around mocha that finds tests anywhere in your project and provides a utility that gets tests up and running quickly

Install

Supported on Node.js versions 4 and 6

  • npm install --save-dev mycha
  • add ./node_modules/.bin to your PATH environment variable

Usage

  • mycha install

    • prompts you for where you would like to install your default test helper, testHelperPath

      • If testHelperPath has an extension found here then it writes the test helper in that language and updates the configuration file accordingly
    • runs

      npm install --save-dev chai sinon sinon-chai
    • writes to testHelperPath

      process.env.NODE_ENV = 'test';
      
      var chai = require('chai');
      var sinon = require('sinon');
      chai.use(require('sinon-chai'));
      
      global.chai = chai;
      global.expect = chai.expect;
      global.sinon = sinon;
    • writes to mycha.yml

      # Environment variables to add to process.env when running mocha
      mochaEnv: {}
      
      # Default options to pass to mocha (can be overridden by command line options)
      mochaOptions:
        colors: true
        reporter: dot
      
      # Path patten used for finding tests (see https://github.com/isaacs/minimatch)
      testFilePattern: '**/*{spec,test}.js'
      
      # Files to include before all tests
      testHelpers:
        - #{testHelperPath}
  • mycha [mochaOptions] [<folder>...] [<file>...]

    • if no folders or files are specified runs all tests
    • if folders or files are specified, pass them through to mocha

Compilers

To add a new compiler, add an entry here and add a language specific version of the test helper here.

Development

see our developer documentation

3.0.1

7 years ago

3.0.0

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

8 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.6

9 years ago

0.6.5

9 years ago

0.6.4

9 years ago

0.6.3

9 years ago

0.6.2

10 years ago

0.6.1

10 years ago

0.6.0

10 years ago

0.5.1

10 years ago

0.5.0

10 years ago

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.2.0

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago

0.0.0

11 years ago