diff options
author | 2023-09-28 04:48:26 +0800 | |
---|---|---|
committer | 2023-09-27 16:48:26 -0400 | |
commit | 4ed410db507723d8f8edd70aec508415d77ad2f5 (patch) | |
tree | dd876939fc708358d0675ba159e0a1d9af0fcd79 /packages/integrations/netlify/test/functions/edge-middleware.test.js | |
parent | a10a798c18512796d2c8b8ed49924dafd884e04c (diff) | |
download | astro-4ed410db507723d8f8edd70aec508415d77ad2f5.tar.gz astro-4ed410db507723d8f8edd70aec508415d77ad2f5.tar.zst astro-4ed410db507723d8f8edd70aec508415d77ad2f5.zip |
Remove Netlify adapter from core (#8574)
* New link
* More explicit
* Add placeholder package.json
* lockfile
* add keyworkds
Diffstat (limited to 'packages/integrations/netlify/test/functions/edge-middleware.test.js')
-rw-r--r-- | packages/integrations/netlify/test/functions/edge-middleware.test.js | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/packages/integrations/netlify/test/functions/edge-middleware.test.js b/packages/integrations/netlify/test/functions/edge-middleware.test.js deleted file mode 100644 index a83720a4d..000000000 --- a/packages/integrations/netlify/test/functions/edge-middleware.test.js +++ /dev/null @@ -1,44 +0,0 @@ -import netlifyAdapter from '../../dist/index.js'; -import { testIntegration, loadFixture } from './test-utils.js'; -import { expect } from 'chai'; - -describe('Middleware', () => { - it('with edge handle file, should successfully build the middleware', async () => { - /** @type {import('./test-utils').Fixture} */ - const fixture = await loadFixture({ - root: new URL('./fixtures/middleware-with-handler-file/', import.meta.url).toString(), - output: 'server', - adapter: netlifyAdapter({ - dist: new URL('./fixtures/middleware-with-handler-file/dist/', import.meta.url), - edgeMiddleware: true, - }), - site: `http://example.com`, - integrations: [testIntegration()], - build: { - excludeMiddleware: true, - }, - }); - await fixture.build(); - const contents = await fixture.readFile('../.netlify/edge-functions/edgeMiddleware.js'); - expect(contents.includes('"Hello world"')).to.be.true; - }); - - it('without edge handle file, should successfully build the middleware', async () => { - /** @type {import('./test-utils').Fixture} */ - const fixture = await loadFixture({ - root: new URL('./fixtures/middleware-without-handler-file/', import.meta.url).toString(), - output: 'server', - adapter: netlifyAdapter({ - dist: new URL('./fixtures/middleware-without-handler-file/dist/', import.meta.url), - }), - site: `http://example.com`, - integrations: [testIntegration()], - build: { - excludeMiddleware: true, - }, - }); - await fixture.build(); - const contents = await fixture.readFile('../.netlify/edge-functions/edgeMiddleware.js'); - expect(contents.includes('"Hello world"')).to.be.false; - }); -}); |