Skip to content
@mochify-js

Mochify.js

Headless browser testing for Mocha with plugins for Puppeteer, Playwright, WebDriver and JSDom.

Mochify.js

Headless browser testing for Mocha with plugins for Puppeteer, Playwright, WebDriver and JSDom.

Install

This will install the Mochify CLI and the puppeteer driver in your current project and add it to the devDependencies:

npm i @mochify/cli @mochify/driver-puppeteer -D

Puppeteer will download a recent version of Chromium. If you want to skip the download and provide your own executable instead, define the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD environment variable or add this to your package.json:

{
  "config": {
    "puppeteer_skip_chromium_download": true
  }
}

For proxy settings and other environment variables, see the Puppeteer documentation.

Usage

mochify --driver puppeteer './{,!(node_modules)/**}/*.test.js'

Workaround for Apple Silicon

Puppeteer fails to launch on M1. Follow these steps to work around:

  • Install Google Chrome

  • Define these environment variables:

    export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
    export PUPPETEER_EXECUTABLE_PATH=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

License

MIT

Pinned Loading

  1. cli cli Public

    Run mocha tests in headless browsers from the command line

    JavaScript 1

  2. driver-puppeteer driver-puppeteer Public

    Puppeteer driver for Mochify

    JavaScript 1

  3. driver-playwright driver-playwright Public

    Playwright driver for Mochify

    JavaScript 1

  4. driver-webdriver driver-webdriver Public

    WebDriver driver for Mochify

    JavaScript

Repositories

Showing 7 of 7 repositories
  • mochify Public

    Run mocha tests in headless browsers

    mochify-js/mochify’s past year of commit activity
    JavaScript 1 MIT 0 0 0 Updated Nov 5, 2024
  • driver-puppeteer Public

    Puppeteer driver for Mochify

    mochify-js/driver-puppeteer’s past year of commit activity
    JavaScript 0 MIT 1 0 0 Updated Aug 16, 2024
  • cli Public

    Run mocha tests in headless browsers from the command line

    mochify-js/cli’s past year of commit activity
    JavaScript 1 MIT 0 0 0 Updated Dec 28, 2023
  • driver-webdriver Public

    WebDriver driver for Mochify

    mochify-js/driver-webdriver’s past year of commit activity
    JavaScript 0 MIT 0 0 0 Updated Dec 27, 2023
  • driver-playwright Public

    Playwright driver for Mochify

    mochify-js/driver-playwright’s past year of commit activity
    JavaScript 1 MIT 0 0 0 Updated Dec 27, 2023
  • driver-jsdom Public

    JSDom driver for Mochify

    mochify-js/driver-jsdom’s past year of commit activity
    JavaScript 0 MIT 0 0 0 Updated Dec 27, 2023
  • .github Public
    mochify-js/.github’s past year of commit activity
    0 0 0 0 Updated Dec 24, 2023

Top languages

JavaScript

Most used topics

Loading…