mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 00:56:01 +00:00
refactored adapters to run test suites (#126)
* refactored adapters to run test suites * fix bun version for tests * added missing adapter tests and refactored examples to use `bknd.config.ts` where applicable
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { afterAll, beforeAll, describe } from "bun:test";
|
||||
import * as nextjs from "./nextjs.adapter";
|
||||
import { disableConsoleLog, enableConsoleLog } from "core/utils";
|
||||
import { adapterTestSuite } from "adapter/adapter-test-suite";
|
||||
import { bunTestRunner } from "adapter/bun/test";
|
||||
import type { NextjsBkndConfig } from "./nextjs.adapter";
|
||||
|
||||
beforeAll(disableConsoleLog);
|
||||
afterAll(enableConsoleLog);
|
||||
|
||||
describe("nextjs adapter", () => {
|
||||
adapterTestSuite<NextjsBkndConfig>(bunTestRunner, {
|
||||
makeApp: nextjs.getApp,
|
||||
makeHandler: nextjs.serve,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user