mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
23 lines
654 B
TypeScript
23 lines
654 B
TypeScript
import { it, expect, describe } from "bun:test";
|
|
import { DbModuleManager } from "modules/db/DbModuleManager";
|
|
import { getDummyConnection } from "../helper";
|
|
|
|
describe("DbModuleManager", () => {
|
|
it("should extract secrets", async () => {
|
|
const { dummyConnection } = getDummyConnection(false);
|
|
const m = new DbModuleManager(dummyConnection, {
|
|
initial: {
|
|
auth: {
|
|
enabled: true,
|
|
jwt: {
|
|
secret: "test",
|
|
},
|
|
},
|
|
},
|
|
});
|
|
await m.build();
|
|
expect(m.toJSON(true).auth.jwt.secret).toBe("test");
|
|
await m.save();
|
|
});
|
|
});
|