Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mycha

Package Overview
Dependencies
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mycha

/'maɪ.kɑː/

  • 0.9.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
increased by240%
Maintainers
4
Weekly downloads
 
Created
Source

Mycha Build Status Dependency Status

/'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

  • 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

    • runs

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

      chai = require 'chai'
      sinon = require 'sinon'
      chai.use require 'sinon-chai'
      
      global.expect = chai.expect
      global.sinon = sinon
      
      process.env.NODE_ENV = 'test'
      
    • writes to mycha.coffee

      module.exports =
      
        # Environment variables to add to process.env when running mocha
        mochaEnv: {}
      
        # Default options to pass to mocha (can be overriden by command line options)
        mochaOptions:
          colors: yes
          compilers: 'coffee:coffee-script/register'
          reporter: 'dot'
      
        # Path patten used for finding tests (see https://github.com/isaacs/minimatch)
        testFilePattern: '**/*_{spec,test}.{coffee,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

Development

see our developer documentation

FAQs

Package last updated on 17 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc