Vitest
Integrate visual testing into your Vitest browser tests with Argos. Capture screenshots and snapshots and review visual changes directly within your CI.
Get started
Requirements
npm i --save-dev @argos-ci/vitestyarn add --dev @argos-ci/vitestpnpm add --save-dev @argos-ci/vitestbun add --dev @argos-ci/vitestnpm i --save-dev vitest @vitest/browser @vitest/browser-playwright playwrightyarn add --dev vitest @vitest/browser @vitest/browser-playwright playwrightpnpm add --save-dev vitest @vitest/browser @vitest/browser-playwright playwrightbun add --dev vitest @vitest/browser @vitest/browser-playwright playwrightCapturing screenshots
import { test } from "vitest";
import { render } from "vitest-browser-react";
import { argosScreenshot } from "@argos-ci/vitest";
import { Button } from "./Button";
test("Button", async () => {
render(<Button>Click me</Button>);
await argosScreenshot("button");
});Capturing snapshots
Tests Sharding
API Overview
argosVitestPlugin(options)
argosVitestPlugin(options)argosScreenshot(name?, options?)
argosScreenshot(name?, options?)argosSnapshot(content, options?)
argosSnapshot(content, options?)Additional Resources
Last updated
Was this helpful?