-
Notifications
You must be signed in to change notification settings - Fork 298
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
Fix svgr in storybook & jest #1428
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
Still not luck. Being swimming in more issues related to this. Mostly: Tried documented solution: Tried some suggested fixes, but nothing seems to work:
tried also: |
also tinkering around on this but no luck so far. What I don't like is that the tests don't fail in the end although they clearly should. It looks like all the storyshots will succeed even if they spit out console errors. Quickly tried minimal Logo test, and this fails successfully with the same error where the storyshots don't fail: import React from 'react'
import { render } from '@testing-library/react'
import Logo from './'
test('Logo', async () => {
render(<Logo />)
}) So getting the test run to fail in this current state would be another goal |
yeah, this is cra! 😬 ok 👍🏽 |
Still no luck on this. I tried so many way to do the same thing, but nothing seems to be working. I'm sure at the end it'll be a trivial setup issue (hopefully), but all of those issues related to the same thing is kind of discouraging though. 😪 |
BINGO! I was deep in next/jest Vercel-Land to verify we are not just overwriting but appending config things, then after hours realized that maybe the No console errors and my dummy Logo test was green. Still concerned that Jest + Storybook didn't error out as it did Jest + Testing Library alone but that can be solved somewhere else. Was quickly dropping in https://github.com/ValentinH/jest-fail-on-console to see if I can get the Jest + Storybook combination to fail with console errors but that didn't work either. |
Code Climate has analyzed commit 7a44b55 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 0.7% (0.0% change). View more on Code Climate. |
oh boy, finally. I confirm the test is passing now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! And as usual lots of research needed to get to a code change which is quite small in the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
Fixes #
Changes proposed in this PR: