Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 12, 2024
1 parent 4ed1ded commit ee305ed
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/vue-query/.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@ function runTest() {

test('Hydration', async () => {
await page.goto(getServerUrl() + url)
await testCounter()
const body = await page.textContent('body')
expect(body).toContain(fetchedText)
await testDOM()
})

test('Navigation', async () => {
await page.click('a[href="/about"]')
await page.click('a[href="/"]')
await testCounter()
await testDOM()
})
}

async function testDOM() {
await testCounter()
const body = await page.textContent('body')
expect(body).toContain(fetchedText)
}

async function testCounter() {
// autoRetry() for awaiting client-side code loading & executing
await autoRetry(
Expand Down

0 comments on commit ee305ed

Please sign in to comment.