tc

throughout-chrome

🎪 End-to-end testing made simple (using Jest and Puppeteer)

Showing:

Popularity

Downloads/wk

2

GitHub Stars

16

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

6

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100