Skip to content

Commit

Permalink
make render check less specific due to arbitrary wait
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Aug 10, 2022
1 parent 577bade commit c0863e1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions test/production/fatal-render-errror/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ describe('fatal-render-errror', () => {

// wait a bit to see if we are rendering multiple times unexpectedly
await waitFor(500)
// there are 4 render attempts of _app due to first render attempt (initial
// error is thrown), second render attempt with custom _error, third render
// attempt with default _error, and final for query update
expect(await browser.eval('window.renderAttempts')).toBe(4)
expect(await browser.eval('window.renderAttempts')).toBeLessThan(10)

const html = await browser.eval('document.documentElement.innerHTML')
expect(html).not.toContain('from _app')
Expand All @@ -47,7 +44,7 @@ describe('fatal-render-errror', () => {

// wait a bit to see if we are rendering multiple times unexpectedly
await waitFor(500)
expect(await browser.eval('window.renderAttempts')).toBe(4)
expect(await browser.eval('window.renderAttempts')).toBeLessThan(10)

const html = await browser.eval('document.documentElement.innerHTML')
expect(html).not.toContain('from _app')
Expand Down

0 comments on commit c0863e1

Please sign in to comment.