
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
@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);
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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.