diff options
author | 2023-11-07 14:01:04 +0000 | |
---|---|---|
committer | 2023-11-07 14:01:04 +0000 | |
commit | 754e4fd31ce49eadb2cf4951e941a48d11d10e73 (patch) | |
tree | 522acb3729dfb47b5a85becafb05b4b3cbbad253 /packages/integrations/vercel/test/static-assets.test.js | |
parent | 35739d01e9cc4fa31a8b85201feecf29c747eca9 (diff) | |
download | astro-754e4fd31ce49eadb2cf4951e941a48d11d10e73.tar.gz astro-754e4fd31ce49eadb2cf4951e941a48d11d10e73.tar.zst astro-754e4fd31ce49eadb2cf4951e941a48d11d10e73.zip |
feat(vercel): streaming (#8879)
Diffstat (limited to 'packages/integrations/vercel/test/static-assets.test.js')
-rw-r--r-- | packages/integrations/vercel/test/static-assets.test.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/packages/integrations/vercel/test/static-assets.test.js b/packages/integrations/vercel/test/static-assets.test.js index 7f360aebc..92e37c0af 100644 --- a/packages/integrations/vercel/test/static-assets.test.js +++ b/packages/integrations/vercel/test/static-assets.test.js @@ -7,9 +7,10 @@ describe('Static Assets', () => { const VALID_CACHE_CONTROL = 'public, max-age=31536000, immutable'; - async function build({ adapter, assets }) { + async function build({ adapter, assets, output }) { fixture = await loadFixture({ root: './fixtures/static-assets/', + output, adapter, build: { assets, @@ -38,31 +39,31 @@ describe('Static Assets', () => { } describe('static adapter', async () => { - const adapter = await import('@astrojs/vercel/static'); + const { default: vercel } = await import('@astrojs/vercel/static'); it('has cache control', async () => { - await build({ adapter }); + await build({ adapter: vercel() }); checkValidCacheControl(); }); it('has cache control other assets', async () => { const assets = '_foo'; - await build({ adapter, assets }); + await build({ adapter: vercel(), assets }); checkValidCacheControl(assets); }); }); describe('serverless adapter', async () => { - const adapter = await import('@astrojs/vercel/serverless'); + const { default: vercel } = await import('@astrojs/vercel/serverless'); it('has cache control', async () => { - await build({ adapter }); + await build({ output: "server", adapter: vercel() }); checkValidCacheControl(); }); it('has cache control other assets', async () => { const assets = '_foo'; - await build({ adapter, assets }); + await build({ output: "server", adapter: vercel(), assets }); checkValidCacheControl(assets); }); }); |