Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon Test: Add Vitest 3 support #30181

Open
wants to merge 22 commits into
base: next
Choose a base branch
from

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 3, 2025

Closes #

What I did

  • Added compatibility for @storybook/experimental-addon-test to support Vitest 3
  • Updated the mono repository to use the latest Vitest 3 beta and updated tests to make them compatible with Vitest 3

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-30181-sha-dba7ad37. Try it out in a new sandbox by running npx [email protected] sandbox or in an existing project with npx [email protected] upgrade.

More information
Published version 0.0.0-pr-30181-sha-dba7ad37
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/add-vitest-3-support
Commit dba7ad37
Datetime Fri Jan 3 11:55:37 UTC 2025 (1735905337)
Workflow run 12597305331

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=30181

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.8 MB 77.8 MB 0 B 1.1 0%
initSize 131 MB 131 MB 0 B 0.08 0%
diffSize 52.9 MB 52.9 MB 0 B -2 0%
buildSize 7.19 MB 7.19 MB 0 B -1.98 0%
buildSbAddonsSize 1.85 MB 1.85 MB 0 B -2 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.87 MB 1.87 MB 0 B -2 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.91 MB 3.91 MB 0 B -2 0%
buildPreviewSize 3.28 MB 3.28 MB 0 B 2.38 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.8s 6.6s -235ms -0.94 -3.6%
generateTime 19.3s 19.1s -282ms -1.25 -1.5%
initTime 12.7s 13.5s 805ms -0.58 5.9%
buildTime 9.3s 8.5s -745ms -1.01 -8.7%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 6s 5.2s -742ms 0.32 -14%
devManagerResponsive 4.3s 3.5s -741ms -0.44 -20.6%
devManagerHeaderVisible 998ms 615ms -383ms -0.4 -62.3%
devManagerIndexVisible 1s 646ms -401ms -0.5 -62.1%
devStoryVisibleUncached 2.2s 2.1s -172ms 0.64 -8.2%
devStoryVisible 1s 652ms -385ms -0.47 -59%
devAutodocsVisible 858ms 387ms -471ms -1.71 🔰-121.7%
devMDXVisible 779ms 529ms -250ms -0.47 -47.3%
buildManagerHeaderVisible 801ms 557ms -244ms -0.6 -43.8%
buildManagerIndexVisible 818ms 692ms -126ms -0.05 -18.2%
buildStoryVisible 792ms 545ms -247ms -0.57 -45.3%
buildAutodocsVisible 612ms 550ms -62ms 1.18 -11.3%
buildMDXVisible 614ms 479ms -135ms 0.01 -28.2%

@valentinpalkovic valentinpalkovic changed the base branch from next to valentin/a11y-refactorings January 3, 2025 11:00
@valentinpalkovic valentinpalkovic self-assigned this Jan 3, 2025
@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/12596687166

@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/12596812168

Copy link

nx-cloud bot commented Jan 3, 2025

View your CI Pipeline Execution ↗ for commit 2fdb0bf.

Command Status Duration Result
nx affected -t check -c production --parallel=7 ✅ Succeeded <1s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-15 08:39:39 UTC

@storybook-bot
Copy link
Contributor

Failed to publish canary version of this pull request, triggered by @valentinpalkovic. See the failed workflow run at: https://github.com/storybookjs/storybook/actions/runs/12596958152

@valentinpalkovic valentinpalkovic added bug ci:daily Run the CI jobs that normally run in the daily job. labels Jan 3, 2025
Base automatically changed from valentin/a11y-refactorings to next January 13, 2025 09:32
@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jan 13, 2025

Package Benchmarks

Commit: b2da8de, ran on 13 January 2025 at 12:07:05 UTC

The following packages have significant changes to their size or dependencies:

@storybook/experimental-addon-test

Before After Difference
Dependency count 60 60 0
Self size 762 KB 832 KB 🚨 +69 KB 🚨
Dependency size 14.15 MB 14.15 MB 🚨 +30 B 🚨
Bundle Size Analyzer Link Link

@@ -96,7 +96,7 @@ describe('eslint-plugin fix', () => {
});

describe('should install eslint plugin', () => {
it('when .eslintrc is using a supported extension', async () => {
it.skip('when .eslintrc is using a supported extension', async () => {
Copy link
Contributor Author

@valentinpalkovic valentinpalkovic Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may need some help from @yannbf figuring out why, in Vitest 3, these tests are failing.

@valentinpalkovic valentinpalkovic added ci:normal and removed ci:daily Run the CI jobs that normally run in the daily job. labels Jan 13, 2025
@valentinpalkovic
Copy link
Contributor Author

Currently blocked by vitest-dev/vitest#7212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants