-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add isTestRunner utility #198
Conversation
Codecov ReportBase: 76.53% // Head: 76.63% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## next #198 +/- ##
==========================================
+ Coverage 76.53% 76.63% +0.09%
==========================================
Files 11 12 +1
Lines 179 184 +5
Branches 37 38 +1
==========================================
+ Hits 137 141 +4
- Misses 42 43 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
c99b443
to
a7305ad
Compare
a7305ad
to
53a5749
Compare
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.
Looks great! Thanks @yannbf
🚀 PR was released in |
Release notes
The test-runner adds a
StorybookTestRunner
entry to the browser's user agent. You can use it to determine if a story is rendering in the context of the test runner. This might be useful if you want to disable certain features in your stories when running in the test runner, though it's likely an edge case.Given that this check is happening in the browser, it is only applicable in the following scenarios:
📦 Published PR as canary version:
0.8.0--canary.198.d45feb9.0
✨ Test out this PR locally via:
Version
Published prerelease version:
v0.8.0-next.0
Changelog
🚀 Enhancement
Authors: 2