@selfage/puppeteer_test_runner
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@selfage/test_runner

Install

npm install @selfage/puppeteer_test_runner

Overview

Written in TypeScript and compiled to ES6 with inline source map & source. See @selfage/tsconfig for full compiler options. Provides a simple test runner that makes each test file itself an exectuable file, executed by @selfage/puppeteer_test_executor.

Test runner for Puppeteer test executor environment

The API to write tests are the same as @selfage/test_runner, except you need to do import { TEST_RUNNER } from "@selfage/puppeteer_test_runner";.

import { TEST_RUNNER } from "@selfage/puppeteer_test_runner";

TEST_RUNNER.run({
  // ...
  // Note this file is run in browser context with an empty HTML page.
  // So you have to make sure that partially created DOM trees are appended to
  // HTML body and also will be cleaned up between test cases.
});

In order to run the test file, you need to first bundle the file as the main file, install @selfage/puppeteer_test_executor, and then do $ pexe your_test_file.

/@selfage/puppeteer_test_runner/

    Package Sidebar

    Install

    npm i @selfage/puppeteer_test_runner

    Weekly Downloads

    2

    Version

    1.1.0

    License

    GPL-3.0-or-later

    Unpacked Size

    39.4 kB

    Total Files

    5

    Last publish

    Collaborators

    • teststaybaka