From cd98154c396cd9d1ea626e151a9a943052d395e0 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 10 Dec 2024 20:45:00 +0000 Subject: [PATCH] test: try to improve spa preloader tests --- docs/2.guide/3.going-further/3.modules.md | 2 +- test/fixtures/spa-loader/app.vue | 7 ++-- .../spa-loader/plugins/delay.client.ts | 3 ++ .../spa-preloader-outside-disabled.test.ts | 18 +++++---- .../spa-preloader-outside-enabled.test.ts | 38 ++++++++++++------- test/suspense.test.ts | 2 +- 6 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 test/fixtures/spa-loader/plugins/delay.client.ts diff --git a/docs/2.guide/3.going-further/3.modules.md b/docs/2.guide/3.going-further/3.modules.md index b12d886821..1bc8a40de1 100644 --- a/docs/2.guide/3.going-further/3.modules.md +++ b/docs/2.guide/3.going-further/3.modules.md @@ -671,7 +671,7 @@ And its test: ```js [test/rendering.ts] import { describe, it, expect } from 'vitest' import { fileURLToPath } from 'node:url' -import { setup, $fetch } from '@nuxt/test-utils' +import { setup, $fetch } from '@nuxt/test-utils/e2e' describe('ssr', async () => { // 2. Setup Nuxt with this fixture inside your test file diff --git a/test/fixtures/spa-loader/app.vue b/test/fixtures/spa-loader/app.vue index b654005857..574b3e6fe0 100644 --- a/test/fixtures/spa-loader/app.vue +++ b/test/fixtures/spa-loader/app.vue @@ -1,8 +1,7 @@