Skip to content

Commit

Permalink
test(e2e): add stderr check (#3508)
Browse files Browse the repository at this point in the history
In local testing, `yarn rw storybook --build` returned with a `0` exit code, however there was `stderr`.

This results in no Storybook artifacts being built, which in turn causes subsequent portions of the Cypress test to fail due to lack of the Storybook assets it is expecting to check the existence of.

This newly add `stderr` check should take care of this case and avoid any future false negatives when calling the storybook build in this way.

---

*Additional flavor*

Noticed this while looking into a failure of [another PR I was working on](https://github.com/redwoodjs/redwood/actions/runs/1299581375).

See also: https://discord.com/channels/679514959968993311/716252919875240007/894760524095578205

Co-authored-by: David Price <thedavid@thedavidprice.com>
  • Loading branch information
virtuoushub and thedavidprice authored Oct 5, 2021
1 parent a2424c2 commit bf9530f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/e2e/cypress/integration/03-storybook/storybook.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ describe(
cy.exec(`cd ${BASE_DIR}; yarn rw storybook --build`, {
timeout: 300_0000,
}) // Slow!
.its('stderr')
.should('eq', '')
.and()
.its('code')
.should('eq', 0)
})
Expand Down

0 comments on commit bf9530f

Please sign in to comment.