From ee305ed6eb5ac6cb659152652aa85802086bd6e0 Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Thu, 12 Sep 2024 17:52:06 +0200 Subject: [PATCH] minor refactor --- examples/vue-query/.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/vue-query/.test.ts b/examples/vue-query/.test.ts index c62eefd2..ff9b5594 100644 --- a/examples/vue-query/.test.ts +++ b/examples/vue-query/.test.ts @@ -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(