Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

domsuite

Package Overview
Dependencies
Maintainers
6
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

domsuite

Browser testing/automation utilities with async/await

  • 0.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
299
decreased by-31.42%
Maintainers
6
Weekly downloads
 
Created
Source

domsuite

Build Status

Work In Progress

JavaScript browser testing/automation utilities. Uses async/await syntax to make asynchronous UI interactions straightforward.

Mocha example:

import {clickElement, condition, nextAnimationFrame} from 'domsuite';

describe(`my sweet UI`, function() {
  it(`renders the foo when I click the bar`, function() {
    await clickElement(document.querySelector(`.bar`));
    await nextAnimationFrame();
    expect(document.querySelector(`.bar`)).to.be.null;
    await condition(() => !!document.querySelector(`.foo`));
  });
});

Installation

npm install --save-dev domsuite

Development / Running tests

Install dependencies

npm install

Browser tests run with Selenium through web-component-tester.

Run with locally installed browsers

npm test

Tunnel to Sauce Labs

SAUCE=1 npm test

Set credentials with environment variables SAUCE_USERNAME and SAUCE_ACCESS_KEY. The default browser/OS matrix is defined in wct.conf.js.

Testing dev loop
  • Terminal 1: Build browser test bundles, rebuild when source files change: WATCH=true npm run test-build
  • Terminal 2: Launch browsers, keep alive after tests run: PERSISTENT=true npm run test-run
  • Change source files, refresh browser tab to rerun tests
  • Open browser dev tools to stop on breakpoints, debug, etc

License

MIT

Keywords

FAQs

Package last updated on 10 Jun 2022

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc