Skip to content

Commit

Permalink
add test-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Aug 2, 2023
1 parent 78e74ac commit 603c1fb
Show file tree
Hide file tree
Showing 4 changed files with 2,248 additions and 60 deletions.
3 changes: 2 additions & 1 deletion yarn-workspaces-monorepo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"private": true,
"scripts": {
"storybook": "yarn workspace storybook-app storybook"
"storybook": "yarn workspace storybook-app storybook",
"test-storybook": "yarn workspace storybook-app test-storybook"
},
"workspaces": [
"packages/*"
Expand Down
24 changes: 14 additions & 10 deletions yarn-workspaces-monorepo/packages/storybook-app/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import type { StorybookConfig } from '@storybook/react-vite';
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ['../../react-vite/src/**/*.mdx', '../../react-vite/src/**/*.stories.@(js|jsx|mjs|ts|tsx)', {
directory: '../src/stories'
}],
stories: [
"../../react-vite/src/**/*.mdx",
"../../react-vite/src/**/*.stories.@(js|jsx|mjs|ts|tsx)",
{
directory: "../src/stories",
},
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
],
framework: {
name: '@storybook/react-vite',
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: 'tag',
autodocs: "tag",
},
};
export default config;
4 changes: 3 additions & 1 deletion yarn-workspaces-monorepo/packages/storybook-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"test-storybook": "test-storybook"
},
"dependencies": {
"react": "^18.2.0",
Expand All @@ -23,6 +24,7 @@
"@storybook/blocks": "^7.2.0",
"@storybook/react": "^7.2.0",
"@storybook/react-vite": "^7.2.0",
"@storybook/test-runner": "0.12.1--canary.339.848d743.0",
"@storybook/testing-library": "^0.2.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
Expand Down
Loading

0 comments on commit 603c1fb

Please sign in to comment.