New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

throughout-chrome

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

throughout-chrome

End-to-end testing made simple

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

Throughout Travis build status

End-to-end testing made simple

Throughout combines Jest and Puppeteer to create a FAST End to End testing environment.

Installation

*Note: Throughout requires at least Node v6.4.0 due to Puppeteer

To install Throughout using NPM:

npm i throughout-chrome

To install Throughout using Yarn:

yarn add throughout-chrome

Note: Puppeteer downloads Chromium.

Usage

To use Throughout please refer to Jest's API and Puppeteer's API.

Here is an example of a test

import * as puppeteer from 'puppeteer';
import { throughoutSettings, throughoutDebug, setViewportAsDesktop } from '../src/browser'; // imported from throughout
import { urlList } from '../testBed/url'; // the url you are testing

describe('Given this is a test', () => {

    let page;
    let browser;
    let debug;

    beforeAll(async () => {
        browser = await puppeteer.launch(throughoutSettings);
        page = await browser.newPage();
        debug = await throughoutDebug('Pokedex PWA Test', page, browser); // throughout will debug for you
        setViewportAsDesktop(page);

        await page.goto(urlList.POKEMON);
    });

    describe('When the user clicks the pokemon link', () => {

        beforeAll(async () => {
            await page.click('#pokemon-link');
        });

        it('Then the pokemon list should be visible', async () => {
            expect(await page.$('#monsters-list')).toBeTruthy();
        });
    });
});


Default settings

  • Uses Headless mode
  • Runs a bundled version of Chromium
  • Runs tests in parallel

Contributors

Throughout was made by Elliot Evans

Keywords

end-to-end-testing

FAQs

Package last updated on 06 Mar 2018

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