Skip to content

Commit

Permalink
test: add details
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed May 20, 2024
1 parent 48e5974 commit 5b0af4a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ describe('prefetch-searchparam', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('should work using browser', async () => {
// load with search param
it('should set prefetch cache properly on different search params', async () => {
// load WITH search param
const browser = await next.browser('/?q=foo')
expect(await browser.elementByCss('p').text()).toBe('{"q":"foo"}')

Expand All @@ -14,7 +14,7 @@ describe('prefetch-searchparam', () => {
await browser.waitForElementByCss('p', 5000)
expect(await browser.elementByCss('p').text()).toBe('{"q":"bar"}')

// navigate to home, should clear the search param
// navigate to home, should clear the searchParams value
await browser.elementByCss('[href="/"]').click()
await browser.waitForElementByCss('p', 5000)
expect(await browser.elementByCss('p').text()).toBe('{}')
Expand Down

0 comments on commit 5b0af4a

Please sign in to comment.