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

7.0.5 • Public • Published

mocha-play

Build Status npm version

Run mocha tests in chromium, using webpack and playwright.

Installation

Install mocha-play as a dev dependency:

npm i mocha-play --save-dev

mocha-play expects mocha, @playwright/browser-chromium, and webpack to also be installed in the project.

Usage

A CLI named mocha-play is available after installation:

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

For example:

mocha-play "test/**/*.spec.js"
mocha-play "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
-w, --watch                         never-closed, open browser, open-devtools, html-reporter session
-l, --list-files                    list found test files
-t, --timeout <ms>                  mocha timeout in ms (default: 2000)
-p, --port <number>                 port to start the http server with (default: 3000)
--reporter <spec/html/dot/...>      mocha reporter to use (default: "spec")
--ui <bdd|tdd|qunit|exports>        mocha user interface (default: "bdd")
-h, --help                          display help for command

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
7.0.5147latest

Version History

VersionDownloads (Last 7 Days)Published
7.0.5147
7.0.41
7.0.31
7.0.21
7.0.11
7.0.01
6.0.21
6.0.11
6.0.01
5.0.11
5.0.01
4.1.21
4.1.11
4.1.01
4.0.01
3.1.01
3.0.21
3.0.11
3.0.01
2.0.31
2.0.21
2.0.11
2.0.01
1.0.11
1.0.01

Package Sidebar

Install

npm i mocha-play

Weekly Downloads

159

Version

7.0.5

License

MIT

Unpacked Size

39.4 kB

Total Files

25

Last publish

Collaborators

  • avi.vahl
  • cijoe
  • alexswix