mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
20 lines
680 B
TypeScript
20 lines
680 B
TypeScript
import { afterAll, beforeAll, describe } from "bun:test";
|
|
import * as awsLambda from "./aws-lambda.adapter";
|
|
import { disableConsoleLog, enableConsoleLog } from "core/utils";
|
|
import { adapterTestSuite } from "adapter/adapter-test-suite";
|
|
import { bunTestRunner } from "adapter/bun/test";
|
|
|
|
beforeAll(disableConsoleLog);
|
|
afterAll(enableConsoleLog);
|
|
|
|
describe("aws adapter", () => {
|
|
adapterTestSuite(bunTestRunner, {
|
|
makeApp: awsLambda.createApp,
|
|
// @todo: add a request to lambda event translator?
|
|
makeHandler: (c, a) => async (request: Request) => {
|
|
const app = await awsLambda.createApp(c, a);
|
|
return app.fetch(request);
|
|
},
|
|
});
|
|
});
|