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

adds error when storyshots finds no stories #2079

Merged

Conversation

theshortcut
Copy link
Contributor

Issue: #1330

What I did

Added an error when storyshots finds no stories. This is makes the test suite failure more obvious than the current failure of no tests being run.

How to test

Modify .storybook/config.js to find no stories, or create a new project with a storyshots suite without any stories.

Is this testable with jest or storyshots?
no
Does this need a new example in the kitchen sink apps?
no
Does this need an update to the documentation?
no
If your answer is yes to any of these, please make sure to include it in your PR.

Copy link
Member

@Hypnosphi Hypnosphi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally makes sense to me, thanks!

@codecov
Copy link

codecov bot commented Oct 18, 2017

Codecov Report

Merging #2079 into release/3.3 will increase coverage by <.01%.
The diff coverage is 50%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release/3.3    #2079      +/-   ##
===============================================
+ Coverage        21.71%   21.72%   +<.01%     
===============================================
  Files              355      355              
  Lines             7059     7061       +2     
  Branches           909      910       +1     
===============================================
+ Hits              1533     1534       +1     
- Misses            4839     4855      +16     
+ Partials           687      672      -15
Impacted Files Coverage Δ
addons/storyshots/src/index.js 79.59% <50%> (-1.26%) ⬇️
app/vue/src/server/config/babel.js 0% <0%> (-100%) ⬇️
lib/ui/src/modules/ui/libs/hierarchy.js 50.74% <0%> (ø) ⬆️
...res__/update-addon-info/update-addon-info.input.js 0% <0%> (ø) ⬆️
addons/knobs/src/components/types/Number.js 8.06% <0%> (ø) ⬆️
addons/info/src/components/types/OneOfType.js 11.11% <0%> (ø) ⬆️
lib/components/src/highlight_button.js 0% <0%> (ø) ⬆️
...es__/update-addon-info/update-addon-info.output.js 0% <0%> (ø) ⬆️
addons/viewport/src/components/RotateViewport.js 22.72% <0%> (ø) ⬆️
lib/ui/src/modules/ui/components/layout/usplit.js 38.7% <0%> (ø) ⬆️
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b94999...2c5161c. Read the comment docs.

@Hypnosphi
Copy link
Member

Hypnosphi commented Oct 18, 2017

@ndelangen @shilman technically it's a feature, so should we rebase it on relase/3.3?

@ndelangen
Copy link
Member

This will introduce a breaking build when there wasn't one before. Definitely a 3.3 feature!

@ndelangen ndelangen changed the base branch from master to release/3.3 October 23, 2017 14:36
@theshortcut
Copy link
Contributor Author

What is the new build failure? A build without any stories will already currently fail due to Jest failing a suite with zero tests.

@ndelangen
Copy link
Member

@theshortcut ow, right. You're 💯% correct!

@Hypnosphi Hypnosphi merged commit 07ee279 into storybookjs:release/3.3 Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants