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

[Bug]: type imports in @storybook/test broken #25750

Closed
osadi opened this issue Jan 25, 2024 · 0 comments · Fixed by #25840
Closed

[Bug]: type imports in @storybook/test broken #25750

osadi opened this issue Jan 25, 2024 · 0 comments · Fixed by #25840

Comments

@osadi
Copy link

osadi commented Jan 25, 2024

Describe the bug

With version > 6.2.0 of @testing-library/jest-dom the default exports for types have changed.

See testing-library/jest-dom@5675b86

This import https://github.com/storybookjs/storybook/blob/next/code/lib/test/src/expect.ts#L17 makes the type Matchers<T> resolve to any.

Pinning @testing-library/jest-dom in the project to 6.2.0 works.

To Reproduce

No response

System

Storybook Environment Info:

  System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12800H
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.12.1 - ~/.nvm/versions/node/v18.16.0/bin/pnpm <----- active
  npmPackages:
    @storybook/addon-essentials: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/addon-interactions: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/blocks: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/jest: ^0.2.3 => 0.2.3
    @storybook/react: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/react-vite: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/test: 8.0.0-alpha.14 => 8.0.0-alpha.14
    @storybook/test-runner: 0.17.0-next.1 => 0.17.0-next.1
    @storybook/testing-library: ^0.2.2 => 0.2.2
    eslint-plugin-storybook: ^0.6.15 => 0.6.15
    storybook: 8.0.0-alpha.14 => 8.0.0-alpha.14

Additional context

No response

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