Skip to content

Commit

Permalink
Fix flaky test (#49178)
Browse files Browse the repository at this point in the history
Found this one being a bit random during dev, but it's trivial. See discussions: #49168 (comment)
  • Loading branch information
shuding committed May 3, 2023
1 parent 2dc0ba4 commit e7a2332
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/e2e/app-dir/navigation/navigation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ createNextDescribe(
{
files: __dirname,
},
({ next, isNextDeploy }) => {
({ next, isNextDev, isNextDeploy }) => {
describe('query string', () => {
it('should set query correctly', async () => {
const browser = await webdriver(next.url, '/')
Expand Down Expand Up @@ -183,10 +183,14 @@ createNextDescribe(
return
}

expect(stored).toEqual({
'navigate-https://example.vercel.sh/': '1',
'navigation-supported': 'true',
})
expect(stored['navigation-supported']).toEqual('true')

// This one is a bit flaky during dev, original notes by @sophiebits:
// > Not actually sure why this is '2' in dev. Possibly something
// > related to an update triggered by <HotReload>?
expect(stored['navigate-https://example.vercel.sh/']).toBeOneOf(
isNextDev ? ['1', '2'] : ['1']
)
})
})

Expand Down

0 comments on commit e7a2332

Please sign in to comment.