
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@zappar/test-utils
Advanced tools
This library contains some handy functions which aid jest-puppeteer tests.
You can find some examples in action over at https://github.com/zappar-xr/test-utils/tree/master/tests
You can use this library by installing from NPM for use in a jest-puppeteer project.
Run the following NPM command inside your project directory:
$ npm install --save-dev @zappar/test-utils
Then import the library into your tests:
import * as util from '@zappar/test-utils';
util.expectConsoleLogs resolves once provided logs are detected before the timeout.
it('expectConsoleLogs', async () => {
const page = await browser.newPage();
page.goto(url);
await util.expectConsoleLogs(
[ // expected logs
'log 1',
'log 2',
'log 3',
],
page,
30000, //timeout
new Set([ // logs to ignore
'[HMR] Waiting for update signal from WDS...',
'[WDS] Hot Module Replacement enabled.',
'[WDS] Live Reloading enabled.',
]),
);
});
util.waitForConsoleLog takes a log to wait for, the page and a timeout.
it('waitForConsoleLog', async () => {
const page = await browser.newPage();
page.goto(url);
await util.waitForConsoleLog('log 5', page, 10000);
});
util.compareScreenshots returns a promise containing the difference between two images.
const buffer = await page.screenshot();
await fs.writeFile('tests/screenshots/page.png', (buffer as unknown) as Buffer);
const diff = await util.compareScreenshots(await fs.readFile('tests/screenshots_expected/correct-page.png'), (buffer as unknown) as Buffer);
await expect(diff).toBeLessThan(50);
[0.0.3] - 2021-04-09
FAQs
Screenshot and console test utilities for jest/puppeteer
We found that @zappar/test-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?

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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.