
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@web/test-runner-chrome
Advanced tools
Browser launcher for @web/test-runner
. Looks for a locally installed instance of Chrome, and controls it using puppeteer-core. This avoids the postinstall step of puppeteer
or playwright
, speeding up installation of projects.
If you don't want to install Chrome globally, for example in a CI environment, you can use @web/test-runner-puppeeteer or @web/test-runner-playwright
See @web/test-runner for a default implementation and CLI for the test runner.
If you are using @web/test-runner, the chrome launcher is used by default. You can instantiate it yourself from the config to use on the advanced options.
If you want to customize the puppeteer launcher options, you can add the browser launcher in the config.
You can find all possible launch options in the official documentation
const { chromeLauncher } = require('@web/test-runner-chrome');
module.exports = {
browsers: [
chromeLauncher({
launchOptions: {
headless: false,
args: ['--some-flag'],
},
}),
],
};
You can use a custom function to create the puppeteer Page
. You can use this for example to set up injecting scripts for environment variables or to expose functions to the browser to control the page.
const { chromeLauncher } = require('@web/test-runner-chrome');
module.exports = {
browsers: [
chromeLauncher({
async createPage({ browser, config }) {
const page = await browser.newPage();
// expose websocket endpoint as an environment variable in the browser
page.evaluateOnNewDocument(wsEndpoint => {
window.__ENV__ = { wsEndpoint };
}, browser.wsEndpoint());
// expose a function in the browser, which calls a function on the
// puppeteer page in NodeJS
page.exposeFunction('puppeteerBringToFront', () => {
page.bringToFront();
});
return page;
},
}),
],
};
FAQs
Chrome browser launcher for Web Test Runner
The npm package @web/test-runner-chrome receives a total of 67,396 weekly downloads. As such, @web/test-runner-chrome popularity was classified as popular.
We found that @web/test-runner-chrome demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.