mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
Test web adapter standalone mode with serve
This commit is contained in:
@@ -84,8 +84,9 @@ describe("web adapter via createBknd in standalone mode", () => {
|
|||||||
adminOptions: { adminBasepath: "/admin" },
|
adminOptions: { adminBasepath: "/admin" },
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const app = await bknd.getApp();
|
const handler = bknd.serve();
|
||||||
expect(app.isBuilt()).toBe(true);
|
const res = await handler(new Request("http://localhost:3000/api/system/config"));
|
||||||
|
expect(res.status).toBe(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("check admin route", async () => {
|
test("check admin route", async () => {
|
||||||
@@ -100,4 +101,4 @@ describe("web adapter via createBknd in standalone mode", () => {
|
|||||||
const res = await handler(new Request("http://localhost:3000/admin"));
|
const res = await handler(new Request("http://localhost:3000/admin"));
|
||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user