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.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
36
decreased by-21.74%
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 --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

Config options

Create a jest-runner-mocha.config.js at the <rootDir> or your Jest project.

  • ui: (Optional) the UI used by mocha
// example
module.exports = {
  ui: 'tdd',
}
  • compiler: (Optional) the used for adding a compile step to your mocha tests
// example
module.exports = {
  compiler: '/absolute/path/to/babel-register/or/other/compiler',
}

NOTE: Eventually Jest will eventually have an option for configuring runners that will eliminate the need for jest-runner-mocha.config.js

Known issues

  • It does not support any Mocha options except for ui and compiler
  • You can't run it with jest --coverage
  • Support for compilers is very limited.
  • Does not support jest --runInBand

FAQs

Package last updated on 06 Sep 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