Skip to content

Commit

Permalink
fix: check no "ERR!" string is in stderr when running Storybook build (
Browse files Browse the repository at this point in the history
…redwoodjs#3509)

* fix: check no "ERR!" string is in stderr

Avoid false positive

Seems stderr is used for info as well as error

see: https://github.com/redwoodjs/redwood/runs/3799459178?check_suite_focus=true

* fix: use .then

hope to avoid `Cannot read properties of undefined (reading 'split')`
see: https://github.com/redwoodjs/redwood/runs/3802028363?check_suite_focus=true

Co-authored-by: David Price <thedavid@thedavidprice.com>
  • Loading branch information
virtuoushub and thedavidprice authored Oct 5, 2021
1 parent 96998fa commit 21f2a49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/e2e/cypress/integration/03-storybook/storybook.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ describe(
Step2_2_BlogPostsCellMock
)

// Slow!
cy.exec(`cd ${BASE_DIR}; yarn rw storybook --build`, {
timeout: 300_0000,
}) // Slow!
.its('stderr')
.should('eq', '')
.and()
.its('code')
.should('eq', 0)
}).then((result) => {
const { code, stderr } = result
expect(code).to.eq(0)
expect(stderr).to.not.contain('ERR!')
})
})

it('1. Component: BlogPost', () => {
Expand Down

0 comments on commit 21f2a49

Please sign in to comment.