
Security News
Insecure Agents Podcast: How to Keep AI Agents From Bypassing Security Controls
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.
@vitest/browser-preview
Advanced tools
See how your tests look like in a real browser. For proper and stable browser testing, we recommend running tests in a headless browser in your CI instead. For this, you should use either:
Install the package with your favorite package manager:
npm install -D @vitest/browser-preview
# or
yarn add -D @vitest/browser-preview
# or
pnpm add -D @vitest/browser-preview
Then specify it in the browser.provider field of your Vitest configuration:
// vitest.config.ts
import { defineConfig } from 'vitest/config'
import { preview } from '@vitest/browser-preview'
export default defineConfig({
test: {
browser: {
provider: preview(),
instances: [
{ browser: 'chromium' },
],
},
},
})
Then run Vitest in the browser mode:
npx vitest --browser
If browser didn't open automatically, follow the link in the terminal to open the browser preview.
FAQs
Browser running for Vitest using your browser of choice
The npm package @vitest/browser-preview receives a total of 1,459,979 weekly downloads. As such, @vitest/browser-preview popularity was classified as popular.
We found that @vitest/browser-preview demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.