Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@augment-vir/test

electrovir3.9k(MIT or CC0 1.0)31.59.0TypeScript support: included

A universal testing suite that works with Mocha style test runners and Node.js's built-in test runner.

test, suite, augment, helper, util, node, browser, backend, frontend, vir, augment-vir

readme

@augment-vir/test

A universal testing suite that works with Mocha style test runners, Node.js's built-in test runner, and Playwright tests with the following main exports:

  • describe: the normal describe test suite function, automatically imported based on the current environment.
  • it: the normal it test function, automatically imported based on the current environment.
  • itCases: a succinct way to test lots of inputs and outputs to a single function.
  • testWeb: a API of web testing utilities, only available in browser environments.
  • testPlaywright: a API of Playwright testing utilities, only available in Playwright test environments.

See the docs under Test, or Package: @augment-vir/test here: https://electrovir.github.io/augment-vir

Caveats

Playwright does not always set the PLAYWRIGHT_TEST env var, especially if you have a playwright config file that imports from TypeScript. If your playwright tests aren't working with this package, try setting PLAYWRIGHT_TEST="1" as an env var before calling Playwright (PLAYWRIGHT_TEST="1" playwright test).