You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP โ†’
Socket
Socket
Sign inDemoInstall

@web/test-runner

Package Overview
Dependencies
Maintainers
7
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/test-runner

Test runner for web applications


Version published
Weekly downloads
58K
decreased by-7.48%
Maintainers
7
Created
Weekly downloads
ย 

Readme

Source

Web Test Runner

Test runner for web applications.

๐Ÿ‘‰ย ย  Headless browsers with Puppeteer, Playwright, or Selenium.
๐Ÿšงย ย  Reports logs, 404s, and errors from the browser.
๐Ÿ”ย ย  Debug opens a real browser window with devtools.
๐Ÿ“ฆย ย  Mock es modules using Import Maps.
๐Ÿ”งย ย  Exposes browser properties like viewport size and dark mode.
โฑย ย Runs tests in parallel and isolation.
๐Ÿ‘€ย ย  Interactive watch mode.
๐Ÿƒย ย  Fast development by rerunning only changed tests.
๐Ÿš€ย ย  Powered by esbuild and rollup plugins

See our website for full documentation.

Installation

Install the web test runner:

npm i --save-dev @web/test-runner

Basic commands

Do a single test run:

web-test-runner test/**/*.test.js --node-resolve
wtr test/**/*.test.js --node-resolve

Run in watch mode, reloading on file changes:

web-test-runner test/**/*.test.js --node-resolve --watch
wtr test/**/*.test.js --node-resolve --watch

Run with code coverage profiling (this is slower):

web-test-runner test/**/*.test.js --node-resolve --coverage
wtr test/**/*.test.js --node-resolve --coverage

Transform JS to a compatible syntax based on user agent:

web-test-runner test/**/*.test.js --node-resolve --esbuild-target auto
wtr test/**/*.test.js --node-resolve --esbuild-target auto

Guide

Check out this step by step guide to get started.

Example projects

Check out the example projects for a fully integrated setup.

Documentation

See our website for full documentation.

Keywords

FAQs

Package last updated on 04 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc