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]: Unit test coverage is broken in CI #19857

Closed
IanVS opened this issue Nov 16, 2022 · 2 comments
Closed

[Bug]: Unit test coverage is broken in CI #19857

IanVS opened this issue Nov 16, 2022 · 2 comments

Comments

@IanVS
Copy link
Member

IanVS commented Nov 16, 2022

Describe the bug

Currently seeing this in CI:

Failed to collect coverage from /tmp/storybook/code/frameworks/nextjs/src/next-image-loader-stub.ts
ERROR: /tmp/storybook/code/frameworks/nextjs/src/next-image-loader-stub.ts: `export =` is not supported by @babel/plugin-transform-typescript
Please consider using `export <value>;`.
  29 | nextImageLoaderStub.raw = true;
  30 |
> 31 | export = nextImageLoaderStub;

To Reproduce

Check a recent CI job

System

No response

Additional context

I tried changing to a default export, but then I get errors like this:

Error: ENAMETOOLONG: name too long, open '/Users/ianvs/code/storybook/storybook/sandbox/nextjs-default-ts/<svg xmlns="http:/www.w3.org/2000/svg" xmlns:xlink="http:/www.w3.org/1999/xlink" width="48" height="48" version="1.1" viewBox="0 0 48 48"><title>illustration/repo</title><g id="illustration/repo" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><path id="Rectangle-62-Copy" fill="#B7F0EF" d="M27.2217723,9.04506931 L41.2217723,6.2682098 C43.3886973,5.83840648 45.4937616,7.2466219 45.9235649,9.41354696 C45.9743993,9.66983721 46,9.93049166 46,10.1917747 L46,32.581381 C46,34.4904961 44.650862,36.1335143 42.7782277,36.5049459 L28.7782277,39.2818054 C26.6113027,39.7116087 24.5062384,38.3033933 24.0764351,36.1364682 C24.0256007,35.880178 24,35.6195235 24,35.3582405 L24,12.9686342 C24,11.0595191 25.349138,9.4165009 27.2217723,9.04506931 Z" opacity=".7"/><path id="Combined-Shape" fill="#87E6E5" d="M6.77822775,6.2682098 L20.7782277,9.04506931 C22.650862,9.4165009 24,11.0595191 24,12.9686342 L24,35.3582405 C24,37.5673795 22.209139,39.3582405 20,39.3582405 C19.738717,39.3582405 19.4780625,39.3326398 19.2217723,39.2818054 L5.22177225,36.5049459 C3.34913798,36.1335143 2,34.4904961 2,32.581381 L2,10.1917747 C2,7.98263571 3.790861,6.19177471 6,6.19177471 C6.26128305,6.19177471 6.5219375,6.21737537 6.77822775,6.2682098 Z"/><path id="Rectangle-63-Copy-2" fill="#61C1FD" d="M22,10 C23.1666667,10.2291667 24.0179036,10.625 24.5537109,11.1875 C25.0895182,11.75 25.5716146,12.875 26,14.5625 C26,29.3020833 26,37.5208333 26,39.21875 C26,40.9166667 26.4241536,42.9583333 27.2724609,45.34375 L24.5537109,41.875 L22.9824219,45.34375 C22.327474,43.1979167 22,41.2291667 22,39.4375 C22,37.6458333 22,27.8333333 22,10 Z"/></g></svg>'

So, I'm wondering if the image stub is broken.

@yannbf
Copy link
Member

yannbf commented Nov 16, 2022

Closed by #19858

@yannbf yannbf closed this as completed Nov 16, 2022
@shilman
Copy link
Member

shilman commented Nov 17, 2022

Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.50 containing PR #19858 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

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

No branches or pull requests

3 participants