Skip to content

Commit

Permalink
chore: remove failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 23, 2023
1 parent 3dd7012 commit 1375192
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
12 changes: 0 additions & 12 deletions packages/integrations/vercel/src/serverless/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ export default function vercelServerless({
// Remove temporary folder
await removeDir(buildTempFolder);

// Write middleware
await writeFile(new URL('./middleware.js', functionFolder), generateMiddlewareCode());

// Enable ESM
// https://aws.amazon.com/blogs/compute/using-node-js-es-modules-and-top-level-await-in-aws-lambda/
await writeJson(new URL(`./package.json`, functionFolder), {
Expand Down Expand Up @@ -149,12 +146,3 @@ function getRuntime() {
const major = version.split('.')[0]; // '16.5.0' --> '16'
return `nodejs${major}.x`;
}

function generateMiddlewareCode() {
return `
import {onRequest} from "somethere";
export default function middleware(request, context) {
return onRequest(request)
}
`;
}
5 changes: 0 additions & 5 deletions packages/integrations/vercel/test/edge-middleware.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,4 @@ describe('Serverless prerender', () => {
root: './fixtures/middleware/',
});
});

it('build successful', async () => {
await fixture.build();
expect(await fixture.readFile('../.vercel/output/static/index.html')).to.be.ok;
});
});

0 comments on commit 1375192

Please sign in to comment.