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 warnings inside our tests #2196
Comments
If no one's looking into this yet I can take a go at it |
@syneva-runyan if you can, that would be great. thanks! |
@danielduan are the console.info statements good to be left in? For example, the ones that print out from app/react/src/server/babel_config.test.js |
I don't see any info statements in that file. Can you link it? |
@danielduan @syneva-runyan Any thoughts on making |
@dangreenisrael I think it's a good idea |
@Hypnosphi Should this be onto master or release 3.3? |
I think tests that don't significantly impact the code we ship to users can be put on master. In general, bug fixes and developer oriented tooling can go on master. |
@danielduan, line 86 in app/react/src/server/babel_config.js for instance prints out => Loading custom .babelrc
We could mock the logger so the messages don't show up in the console when running tests. |
@syneva-runyan that would be great, thanks! I think a todo in the future would be to have a silent mode for webpack and babel so these info outputs can be turned off for CI builds to avoid polluting logs too. |
Regarding a specific issue from tree/master/addons/info: An Invalid DOM nesting error is being thrown in the first test, <pre> cannot be a decendant of <p> This error comes from the following:
The provided markdown is rendered inside a <p> tag, as definied in text.js, <P>. When the rest of the markdown parsed with marksy, the A similar error would be thrown if a link was provided in the markdown, ex
Possible solutions to this problem would be:
Thoughts on the best approach here? @danielduan |
It should probably just be a |
Raised a pull request, #2343 Sorry for taking so long! Regarding warning from I thought about putting in a fix for an issue that came up here where using marksy to output a function (rather than a string) spat out a warning, but figured that may be a separate issue (or maybe a marksy issue?) to deal with. Instead, I've added a .toString() to the passed function, suppressing the warning for now. |
…ail-tests-#2196 Issue #2196 - Set console.warn and console.error to throw in tests
If this is merged into master, should the issue be closed? @Hypnosphi. This (#1138) seems to imply that we want to get issues closed on the sooner side. |
Let's close it when the same is done for |
Put in pull request for the warnings in release/3.3 https://github.com/storybooks/storybook/pull/2381/files |
When running tests for cra-kitchen-sink, we have lots of warnings and messages thrown for react things.
Some of them are simply fixing the usage examples, some are resolving things react likes to complain about.
It'd be nice to have a clean test.
The text was updated successfully, but these errors were encountered: