@chialab/rna-browser-test-runner
TypeScript icon, indicating that this package has built-in type declarations

0.18.0 • Public • Published

RNA logo

RNA Browser Test Runner • A test runner for browsers based on Web Test Runner.

NPM


Install

npm i @chialab/rna-browser-test-runner -D
yarn add @chialab/rna-browser-test-runner -D

Usage

Start a browser test runner based on the web dev server. It uses mocha but you still need to import an assertion library (recommended @open-wc/testing).

Via import

import { test } from '@chialab/rna-browser-test-runner';

/**
 * @see https://modern-web.dev/docs/test-runner/cli-and-configuration/
 */
await test({
    // files: ['...'],
});

Via cli

test:browser [options] [specs...]

Options:
  -P, --port                 dev server port
  --watch                    watch test files
  --concurrency <number>     number of concurrent browsers
  --coverage                 add coverage to tests
  --manual                   manual test mode
  --open                     open the browser
  --saucelabs [browsers...]  run tests using Saucelabs browsers
  -h, --help                 display help for command

Samples

rna test:browser
rna test:browser 'test/**/*.spec.js' --coverage
rna test:browser 'test/elements.spec.js' --watch --open

License

RNA Browser Test Runner is released under the MIT license.

Package Sidebar

Install

npm i @chialab/rna-browser-test-runner

Weekly Downloads

71

Version

0.18.0

License

MIT

Unpacked Size

13.2 kB

Total Files

5

Last publish

Collaborators

  • chialab-admin
  • chialab-developers