mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
1.9 KiB
1.9 KiB
import { beforeAll } from 'vitest';
import { render as testingLibraryRender } from '@testing-library/react';
import { setProjectAnnotations } from '@storybook/react';
import * as addonAnnotations from 'my-addon/preview';
import * as previewAnnotations from './.storybook/preview';
const annotations = setProjectAnnotations([
previewAnnotations,
addonAnnotations,
// Attention: Passing the render function from testing library is required if you mount stories in play functions
{ testingLibraryRender },
]);
// Supports beforeAll hook from Storybook
beforeAll(annotations.beforeAll);
import { beforeAll } from 'vitest';
import { render as testingLibraryRender } from '@testing-library/svelte';
import { setProjectAnnotations } from '@storybook/svelte';
import * as addonAnnotations from 'my-addon/preview';
import * as previewAnnotations from './.storybook/preview';
const annotations = setProjectAnnotations([
previewAnnotations,
addonAnnotations,
// Attention: Passing the render function from testing library is required if you mount stories in play functions
{ testingLibraryRender },
]);
// Supports beforeAll hook from Storybook
beforeAll(annotations.beforeAll);
import { beforeAll } from 'vitest';
import { render as testingLibraryRender } from '@testing-library/vue';
import { setProjectAnnotations } from '@storybook/vue3';
import * as addonAnnotations from 'my-addon/preview';
import * as previewAnnotations from './.storybook/preview';
const annotations = setProjectAnnotations([
previewAnnotations,
addonAnnotations,
// Attention: Passing the render function from testing library is required if you mount stories in play functions
{ testingLibraryRender },
]);
// Supports beforeAll hook from Storybook
beforeAll(annotations.beforeAll);