release: WRNexusJS 0.5.10
This commit is contained in:
@@ -178,6 +178,26 @@ test("config.auth registers package routes", async () => {
|
||||
|
||||
expect(contributions.migrations).toHaveLength(0);
|
||||
});
|
||||
test("config.auth contributes a reusable forward-auth verification route", async () => {
|
||||
const runner = createPluginRunner(authPlugin(), {
|
||||
root: process.cwd(),
|
||||
mode: "development",
|
||||
command: "dev",
|
||||
metadata: new Map<string, unknown>(),
|
||||
warn() {},
|
||||
});
|
||||
await runner.configure({
|
||||
auth: {
|
||||
engine: {} as never,
|
||||
routes: true,
|
||||
},
|
||||
});
|
||||
const contributions = await runner.contributions();
|
||||
expect(contributions.routes.some((route) => route.path === "/api/auth/session/verify")).toBe(
|
||||
true,
|
||||
);
|
||||
});
|
||||
|
||||
test("config.auth can disable route groups", async () => {
|
||||
const metadata = new Map<string, unknown>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user