{"library":"storycap-testrun","title":"Storycap Test Runner for Storybook Visual Testing","type":"library","description":"storycap-testrun is a utility designed to provide stable screenshot capture functionality specifically for Storybook components, integrated with `@storybook/test-runner`. While the root `storycap-testrun` package is currently at version 1.0.0, the primary development and new features are delivered through its scoped sub-packages: `@storycap-testrun/node` and `@storycap-testrun/browser`, which are actively maintained and are at version 2.1.0. This library enables visual regression testing by capturing screenshots of Storybook stories, leveraging Playwright for reliable browser automation. It differentiates itself by integrating directly into the `@storybook/test-runner` ecosystem, allowing developers to extend their existing Storybook testing setups with visual verification. Recent updates in the 2.x.x series of the scoped packages include per-story image configuration options and official support for Vitest-based browser testing. The release cadence for the scoped packages appears to be several minor/major updates per year, indicating active development.","language":"javascript","status":"active","last_verified":"Thu Apr 23","install":{"commands":["npm install storycap-testrun"],"cli":null},"imports":["import preset from '@storycap-testrun/node/preset';","import { createVitestPlugin } from '@storycap-testrun/browser/vitest-plugin';"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/reg-viz/storycap-testrun","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/storycap-testrun","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"// .storybook/test-runner-jest.config.js (or similar Jest/Playwright configuration)\nimport { defineConfig } from 'jest-runner-storybook';\nimport preset from '@storycap-testrun/node/preset';\n\nexport default defineConfig({\n  ...preset(),\n  // You can customize Playwright launch options here\n  // playwright: {\n  //   launchOptions: {\n  //     headless: true,\n  //   },\n  // },\n  // Add any other custom Jest configuration\n  testTimeout: 30000,\n});\n\n// Example .storybook/preview.js for per-story options (requires @storycap-testrun/node@2.1.0+)\n// import type { Preview } from '@storybook/react';\n// const preview: Preview = {\n//   parameters: {\n//     screenshot: {\n//       fullPage: false,\n//       omitBackground: true,\n//       scale: 1,\n//     },\n//   },\n// };\n// export default preview;\n","lang":"typescript","description":"Demonstrates how to configure `@storybook/test-runner` with `@storycap-testrun/node`'s preset for stable screenshot capture. It also hints at per-story options.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}