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

8.1.0 • 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
8.1.0120latest

Version History

VersionDownloads (Last 7 Days)Published
8.1.0120
8.0.00
7.0.50
7.0.48
7.0.30
7.0.21
7.0.129
7.0.00
6.0.21
6.0.10
6.0.03
5.0.120
5.0.021
4.1.21
4.1.12
4.1.0127
4.0.00
3.1.0769
3.0.243
3.0.1224
3.0.0147
2.0.384
2.0.220
2.0.10
2.0.00
1.0.111
1.0.00

Package Sidebar

Install

npm i mocha-play

Weekly Downloads

1,408

Version

8.1.0

License

MIT

Unpacked Size

39.3 kB

Total Files

25

Last publish

Collaborators

  • avi.vahl
  • cijoe
  • alexswix