🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

mocha-web

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-web

Run mocha tests in chromium, using esbuild and playwright.

2.3.0
latest
Source
npm
Version published
Weekly downloads
3.3K
60%
Maintainers
1
Weekly downloads
 
Created
Source

mocha-web

Build Status npm version

Run mocha tests in chromium, using esbuild and playwright.

Installation

Install mocha-web as a dev dependency:

npm i mocha-web --save-dev

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

Usage

A CLI named mocha-web is available after installation:

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

For example:

mocha-web "test/**/*.spec.js"
mocha-web "test/**/*.spec.ts" -c esbuild.config.js

CLI Options

-v, --version                       output the version number
-c, --esbuild-config <config file>  esbuild 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

FAQs

Package last updated on 18 May 2025

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