From d5f301ed8ae5f24dee5290e9fb90ba26fa7170e1 Mon Sep 17 00:00:00 2001 From: Kasper Peulen Date: Fri, 25 Oct 2024 13:58:11 +0200 Subject: [PATCH] Add test addon --- .storybook/main.ts | 2 +- .storybook/vitest.setup.ts | 2 +- package.json | 1 - vitest.workspace.ts | 12 +----------- yarn.lock | 16 ---------------- 5 files changed, 3 insertions(+), 30 deletions(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index 40918e4f..2a1fafaf 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -10,10 +10,10 @@ const config: StorybookConfig = { addons: [ '@chromatic-com/storybook', '@storybook/addon-essentials', - '@storybook/addon-interactions', '@storybook/addon-a11y', '@storybook/addon-coverage', '@storybook/addon-designs', + '@storybook/experimental-addon-test' ], typescript: { reactDocgen: 'react-docgen', diff --git a/.storybook/vitest.setup.ts b/.storybook/vitest.setup.ts index 36599990..273710cd 100644 --- a/.storybook/vitest.setup.ts +++ b/.storybook/vitest.setup.ts @@ -6,4 +6,4 @@ import * as projectAnnotations from './preview'; // More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations const project = setProjectAnnotations([projectAnnotations]); -beforeAll(project.beforeAll); +beforeAll(project.beforeAll); \ No newline at end of file diff --git a/package.json b/package.json index 2482d01d..8631726f 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,6 @@ "@storybook/addon-coverage": "^1.0.4", "@storybook/addon-designs": "^8.0.3", "@storybook/addon-essentials": "^8.4.0-beta.0", - "@storybook/addon-interactions": "^8.4.0-beta.0", "@storybook/addon-themes": "^8.4.0-beta.0", "@storybook/blocks": "^8.4.0-beta.0", "@storybook/experimental-addon-test": "^8.4.0-beta.0", diff --git a/vitest.workspace.ts b/vitest.workspace.ts index 65d85028..ccb8f2e0 100644 --- a/vitest.workspace.ts +++ b/vitest.workspace.ts @@ -24,14 +24,4 @@ export default defineWorkspace([ setupFiles: ['./.storybook/vitest.setup.ts'], }, }, - // This is just to test legacy code, ignore this. - { - extends: 'vite.config.ts', - test: { - name: 'portable-stories', - environment: 'happy-dom', - include: ['**/*.test.tsx'], - setupFiles: ['./ps-setup.ts'], - }, - }, -]); +]); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 56d858a1..63741691 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2149,21 +2149,6 @@ __metadata: languageName: node linkType: hard -"@storybook/addon-interactions@npm:^8.4.0-beta.0": - version: 8.4.0-beta.0 - resolution: "@storybook/addon-interactions@npm:8.4.0-beta.0" - dependencies: - "@storybook/global": "npm:^5.0.0" - "@storybook/instrumenter": "npm:8.4.0-beta.0" - "@storybook/test": "npm:8.4.0-beta.0" - polished: "npm:^4.2.2" - ts-dedent: "npm:^2.2.0" - peerDependencies: - storybook: ^8.4.0-beta.0 - checksum: 10c0/f7ec70526733f955629fb5a96ae325c7f894b4289557f4521477a4c4e130c7954b4a3f9afca4bc6ea54cc75ff1993e980496be83b6a65c9859261922e4058c5a - languageName: node - linkType: hard - "@storybook/addon-measure@npm:8.4.0-beta.0": version: 8.4.0-beta.0 resolution: "@storybook/addon-measure@npm:8.4.0-beta.0" @@ -5071,7 +5056,6 @@ __metadata: "@storybook/addon-coverage": "npm:^1.0.4" "@storybook/addon-designs": "npm:^8.0.3" "@storybook/addon-essentials": "npm:^8.4.0-beta.0" - "@storybook/addon-interactions": "npm:^8.4.0-beta.0" "@storybook/addon-themes": "npm:^8.4.0-beta.0" "@storybook/blocks": "npm:^8.4.0-beta.0" "@storybook/experimental-addon-test": "npm:^8.4.0-beta.0"