mocha-pup
TypeScript icon, indicating that this package has built-in type declarations

5.1.6 • Public • Published

mocha-pup

Build Status npm version

Run mocha tests in Chrome, using webpack and puppeteer.

Installation

Install mocha-pup as a dev dependency:

npm i mocha-pup --save-dev

mocha-pup expects mocha, puppeteer, webpack, and html-webpack-plugin to also be installed in the project.

Usage

A CLI named mocha-pup is available after installation:

mocha-pup [options] <glob ...>

For example:

mocha-pup "test/**/*.spec.js"
mocha-pup "test/**/*.spec.ts" -c webpack.config.js

CLI Options

  -v, --version                       output the version number
  -c, --webpack-config <config file>  webpack configuration file to bundle with
  -d, --dev                           never-closed, non-headless, open-devtools puppeteer session
  -l, --list-files                    list found test files
  -t, --timeout <ms>                  mocha timeout in ms (default: 2000)
  --reporter <spec/html/dot/...>      mocha reporter to use (default: "spec")
  --ui <bdd|tdd|qunit|exports>        user interface of mocha (default: "bdd")
  --no-colors                         turn off colors (default is env detected)
  -h, --help                          output usage information

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mocha-pup

Weekly Downloads

1

Version

5.1.6

License

MIT

Unpacked Size

35.9 kB

Total Files

25

Last publish

Collaborators

  • avi.vahl
  • cijoe
  • alexswix