diff options
author | 2023-12-01 23:50:15 +0800 | |
---|---|---|
committer | 2023-12-01 10:50:15 -0500 | |
commit | d83991ae8b51a304405330b4af8e9cc502f9bc57 (patch) | |
tree | d47843d3be1ba225c7f46e0c5372b2da56e37c0e /packages/integrations/prefetch/test/test-utils.js | |
parent | c47478bbf6b21973419f25234c68efb59466b368 (diff) | |
download | astro-d83991ae8b51a304405330b4af8e9cc502f9bc57.tar.gz astro-d83991ae8b51a304405330b4af8e9cc502f9bc57.tar.zst astro-d83991ae8b51a304405330b4af8e9cc502f9bc57.zip |
Remove @astrojs/prefetch integration (#9241)
Diffstat (limited to 'packages/integrations/prefetch/test/test-utils.js')
-rw-r--r-- | packages/integrations/prefetch/test/test-utils.js | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/packages/integrations/prefetch/test/test-utils.js b/packages/integrations/prefetch/test/test-utils.js deleted file mode 100644 index 0b5de1f9d..000000000 --- a/packages/integrations/prefetch/test/test-utils.js +++ /dev/null @@ -1,30 +0,0 @@ -import { test as testBase } from '@playwright/test'; -import { loadFixture as baseLoadFixture } from '../../../astro/test/test-utils.js'; - -export function loadFixture(inlineConfig) { - if (!inlineConfig?.root) throw new Error("Must provide { root: './fixtures/...' }"); - - // resolve the relative root (i.e. "./fixtures/tailwindcss") to a full filepath - // without this, the main `loadFixture` helper will resolve relative to `packages/astro/test` - return baseLoadFixture({ - ...inlineConfig, - root: new URL(inlineConfig.root, import.meta.url).toString(), - }); -} - -export function testFactory(inlineConfig) { - let fixture; - - const test = testBase.extend({ - astro: async ({}, use) => { - fixture = await loadFixture(inlineConfig); - await use(fixture); - }, - }); - - test.afterEach(() => { - fixture.resetAllFiles(); - }); - - return test; -} |