Skip to content

Commit

Permalink
feat(addon-jest): add test addon to storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
GaroGabrielyan committed Dec 22, 2023
1 parent b6cd994 commit d3849b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { DocsContainer } from './components/DocContainer';
import { themes } from '@storybook/theming';
import { softConstructThem } from './softConstructThem';

import { Title, Subtitle, Description, Primary, ArgsTable, Stories, PRIMARY_STORY } from '@storybook/addon-docs';
import { Title, Subtitle, Description, ArgsTable, Stories, PRIMARY_STORY } from '@storybook/blocks';
import { withTests } from '@storybook/addon-jest';
import results from '../coverage/.jest-test-results.json';

export const decorators = [
(Story, context) => {
Expand All @@ -16,11 +18,9 @@ export const decorators = [
setDir(RTL);
}, [RTL]);
document.documentElement.dir = dir.toString();

// if you need to override some description 👈
// if(context?.argTypes?.className?.description) context.argTypes.className.description = 'custom description'
return customDecorators(Story);
}
},
withTests({ results })
];

export const parameters = {
Expand Down

0 comments on commit d3849b2

Please sign in to comment.