Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

storybook_vitest_addon

krzysztofradomski2.5kMIT0.1.8TypeScript support: included

Adds a panel to display Vitest unit test results

storybook-addons, addon, storybook, vitest, react, report, test, results, unit-testing

readme

storybook_vitest_addon

#

Release

Installation:

yarn add storybook_vitest_addon

Compatibility:

"storybook": "^8.1.5",
"@storybook/react": "8.1.5",
"@storybook/react-vite": "^8.1.5",
"vitest": "^1.1.0"

Description:

Addon meant to display Vitest unit test results in a new Stoybook panel. Developed and tested with React. Simply add it to the addon list in your Storybook config, and then you can use it in any story.

The addon offers minimal visuals for maximum clarity. It needs 2 params: testResults - test results file in json format and testFile - name of the component test file (TypeScript definitions available).

Example usage:


// Button.stories.tsx

import vitestResults from "./unit-test-results.json";
/.../
export default {
  title: "Example/Button",
  component: Button,
  parameters: {
    vitest: {
      testFile: "Button.test.tsx",
      testResults: vitestResults,
    },
  },
};
/.../

Also see https://storybook.js.org/addons/storybook_vitest_addon

changelog

v0.1.8 (Thu Jul 04 2024)

⚠️ Pushed to main

Authors: 1


v0.1.6 (Thu Jul 04 2024)

🐛 Bug Fix

Authors: 3


v0.1.4 (Tue Jan 02 2024)

🐛 Bug Fix

⚠️ Pushed to main

Authors: 2


v0.1.3 (Thu Nov 02 2023)

⚠️ Pushed to main

Authors: 1


v0.0.9 (Thu Nov 02 2023)

⚠️ Pushed to main

Authors: 1


v0.0.8 (Fri Apr 15 2022)

⚠️ Pushed to main

Authors: 1


v0.0.7 (Tue Apr 12 2022)

⚠️ Pushed to main

Authors: 1


v0.0.6 (Fri Apr 01 2022)

⚠️ Pushed to main

Authors: 1


v0.0.5 (Sun Mar 27 2022)

⚠️ Pushed to main

Authors: 1


v0.0.4 (Sun Mar 27 2022)

⚠️ Pushed to main

Authors: 1


v0.0.3 (Sun Mar 27 2022)

⚠️ Pushed to main

Authors: 1


v0.0.2 (Sun Mar 27 2022)

⚠️ Pushed to main

Authors: 1


v0.0.1 (Sun Mar 27 2022)

⚠️ Pushed to main

Authors: 2