
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/jest-console-logs
Advanced tools
This library contains some handy console functions which aid jest-puppeteer tests.
You can find some examples in action over at https://github.com/zappar-xr/jest-console-logs/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/jest-console-logs
Then import the library into your tests:
import * as util from '@zappar/jest-console-logs';
util.expectSequential resolves once provided logs are detected before the timeout. You may provide a set of logs to be ignored.
it('expectConsoleLogs', async () => {
const page = await browser.newPage();
page.goto(url);
await util.expectSequential(
{
expected: [
'log 1',
'log 2',
'log 3',
],
page,
timeoutMs: 30000,
ignore: new Set([
'[HMR] Waiting for update signal from WDS...',
'[WDS] Hot Module Replacement enabled.',
'[WDS] Live Reloading enabled.',
]),
},
);
await new Promise((resolve) => setTimeout(resolve, 1000));
await page.close();
});
util.expectLogs resolves once provided logs are detected before the timeout.
it('expectUnorderedLogs', async () => {
const page = await browser.newPage();
page.goto(url);
await util.expectLogs({
expected: [
'log 1',
'log 3',
'log 2',
],
timeoutMs: 1000,
page,
});
});
Catching errors:
it('expectUnorderedLogsErrors', async () => {
const page = await browser.newPage();
page.goto(url);
try {
await util.expectLogs({
expected: [
'log 1',
'log 35',
'log 2',
],
timeoutMs: 1000,
page,
});
} catch (e) {
expect(e.message).toEqual('Could not find expected console logs: log 35');
}
});
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);
});
FAQs
Capture and test console logs using jest/puppeteer
The npm package @zappar/jest-console-logs receives a total of 4 weekly downloads. As such, @zappar/jest-console-logs popularity was classified as not popular.
We found that @zappar/jest-console-logs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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.