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

jest-runner-mocha

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-runner-mocha

An experimental Mocha runner for Jest

  • 0.4.0-0
  • next
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
93
increased by82.35%
Maintainers
1
Weekly downloads
 
Created
Source

jest-runner-mocha

Build Status npm version

An experimental Mocha runner for Jest

This makes it easy to integrate existing Mocha projects with Jest.

runner

Usage

Install

Install jest(it needs Jest 21+) and jest-runner-mocha

yarn add --dev jest jest-runner-mocha

# or with NPM

npm install --save-dev jest jest-runner-mocha

Add it to your Jest config

In your package.json

{
  "jest": {
    "runner": "jest-runner-mocha"
  }
}

Or in jest.config.js

module.exports = {
  runner: 'jest-runner-mocha',
}

Run Jest

yarn jest

Options

This project uses cosmiconfig, so you can provide config via:

  • a jest-runner-mocha property in your package.json
  • a jest-runner-mocha.config.js JS file
  • a .jest-runner-mocharc JSON file

In package.json

{
  "jest-runner-mocha": {
    "cliOptions": {
      // Options here
    }
  }
}

or in jest-runner-mocha.config.js

module.exports = {
  cliOptions: {
    // Options here
  }
}

cliOptions

jest-runner-mocha maps some mocha CLI arguments to config options. For example --ui is cliOptions.ui

optionexample
ui"ui": "tdd"
timeout"timeout": 10000
compiler"compiler": "./path/to/babel-register"

Coverage

Coverage works outside of the box, simply yarn jest -- --coverage

You can also use other Jest options like coveragePathIgnorePatterns and coverageReporters

FAQs

Package last updated on 05 Oct 2017

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