Unverified Commit e7a23329 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Fix flaky test (#49178)

Found this one being a bit random during dev, but it's trivial. See discussions: https://github.com/vercel/next.js/pull/49168#issuecomment-1533788373
parent 2dc0ba4b
...@@ -7,7 +7,7 @@ createNextDescribe( ...@@ -7,7 +7,7 @@ createNextDescribe(
{ {
files: __dirname, files: __dirname,
}, },
({ next, isNextDeploy }) => { ({ next, isNextDev, isNextDeploy }) => {
describe('query string', () => { describe('query string', () => {
it('should set query correctly', async () => { it('should set query correctly', async () => {
const browser = await webdriver(next.url, '/') const browser = await webdriver(next.url, '/')
...@@ -183,10 +183,14 @@ createNextDescribe( ...@@ -183,10 +183,14 @@ createNextDescribe(
return return
} }
expect(stored).toEqual({ expect(stored['navigation-supported']).toEqual('true')
'navigate-https://example.vercel.sh/': '1',
'navigation-supported': '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']
)
}) })
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment