JSPM

  • Created
  • Published
  • Downloads 6643
  • Score
    100M100P100Q119841F
  • License MIT

Run mocha or tape unit tests inside real browsers with playwright.

Package Exports

  • playwright-test

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (playwright-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

playwright-test NPM Version NPM Downloads NPM License Build Status

Run mocha or tape unit tests inside real browsers with playwright.

Install

$ npm install playwright-test

Usage

Usage
        $ playwright-test [input]
    Options
        --runner       Test runner. Options: mocha, tape. [Default: mocha]
        --watch, -w    Watch files for changes and re-run tests.
        --browser, -b  Browser to run tests. Options: chromium, firefox, webkit. [Default: chromium]
        --debug, -d    Debug mode, keeps browser window open.
        --mode, -m     Run mode. Options: main, worker. [Default: main]
        --incognito    Use incognito window to run tests.
        --extension    Use extension to run tests.
        --cwd          Current directory. [Default: process.cwd()]
        --extensions   Extensions to bundle. [Default: js,cjs,mjs]
        --assets       Assets to be served by the http server. [Default: process.cwd()]
    Examples
        $ playwright-test test.js --runner tape
        $ playwright-test test/**/*.spec.js --debug
        $ playwright-test test/**/*.spec.js --browser webkit -mode worker --incognito --debug

    Extra arguments
        All arguments passed to the cli not listed above will be fowarded to the runner.
        To send a `false` flag use --no-bail.
        $ playwright-test test.js --runner mocha --bail --grep 'should fail'

        Check https://mochajs.org/api/mocha for `mocha` options or `npx mocha --help`.

License

MIT © Hugo Dias