mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-28 09:56:25 -05:00
* feat: add cloudflare worker basic tests * chore: fix conflict --------- Co-authored-by: Bereket Engida <bekacru@gmail.com>
27 lines
603 B
TypeScript
27 lines
603 B
TypeScript
import {
|
|
defineWorkersProject,
|
|
readD1Migrations,
|
|
} from "@cloudflare/vitest-pool-workers/config";
|
|
import path from "node:path";
|
|
|
|
export default defineWorkersProject(async () => {
|
|
const migrationsPath = path.join(__dirname, "drizzle");
|
|
const migrations = await readD1Migrations(migrationsPath);
|
|
|
|
return {
|
|
test: {
|
|
setupFiles: ["./test/apply-migrations.ts"],
|
|
poolOptions: {
|
|
workers: {
|
|
singleWorker: true,
|
|
wrangler: { configPath: "./wrangler.jsonc" },
|
|
miniflare: {
|
|
d1Databases: ["DB"],
|
|
bindings: { TEST_MIGRATIONS: migrations },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
});
|