diff --git a/code/renderers/vue3/src/__tests__/composeStories/portable-stories.test.ts b/code/renderers/vue3/src/__tests__/composeStories/portable-stories.test.ts index 2eb8719854c..4a908090097 100644 --- a/code/renderers/vue3/src/__tests__/composeStories/portable-stories.test.ts +++ b/code/renderers/vue3/src/__tests__/composeStories/portable-stories.test.ts @@ -1,7 +1,7 @@ // @vitest-environment happy-dom /// ; -import { render, screen } from '@testing-library/vue'; -import { describe, expect, it, vi } from 'vitest'; +import { cleanup, render, screen } from '@testing-library/vue'; +import { afterEach, describe, expect, it, vi } from 'vitest'; import { addons } from 'storybook/internal/preview-api'; @@ -21,6 +21,10 @@ const { CSF3Primary, LoaderStory } = composeStories(stories); // example with composeStory, returns a single story composed with args/decorators const Secondary = composeStory(stories.CSF2Secondary, stories.default); +afterEach(() => { + cleanup(); +}); + describe('renders', () => { it('renders primary button', () => { render(CSF3Primary, { props: { label: 'Hello world' } }); diff --git a/code/renderers/vue3/vitest.config.ts b/code/renderers/vue3/vitest.config.ts index b8a3dcf5900..a3804318162 100644 --- a/code/renderers/vue3/vitest.config.ts +++ b/code/renderers/vue3/vitest.config.ts @@ -10,8 +10,5 @@ export default mergeConfig( defineConfig({ // @ts-expect-error seems like there's a type mismatch in the vue plugin plugins: [vue()], - test: { - globals: true, - }, }) );