test: no async describe

This commit is contained in:
Taesu
2026-02-17 16:46:33 +09:00
parent 0db31160ed
commit cd1655c37e

View File

@@ -1367,18 +1367,10 @@ describe("oauth - prompt", async () => {
});
});
describe("oauth - config", async () => {
const tempServer = await listen(
toNodeHandler(async () => new Response("temp")),
{
port: 0,
},
);
const port = tempServer.address?.port ?? 3002;
await tempServer.close();
const authServerBaseUrl = `http://localhost:${port}`;
const authServerUrl = `${authServerBaseUrl}/api/auth`;
describe("oauth - config", () => {
let port = 3002;
let authServerBaseUrl = `http://localhost:${port}`;
let authServerUrl = `${authServerBaseUrl}/api/auth`;
const rpBaseUrl = "http://localhost:5000";
const providerId = "test";
const redirectUri = `${rpBaseUrl}/api/auth/oauth2/callback/${providerId}`;
@@ -1386,6 +1378,19 @@ describe("oauth - config", async () => {
let server: Listener;
let oauthClient: OAuthClient | null;
beforeAll(async () => {
const tempServer = await listen(
toNodeHandler(async () => new Response("temp")),
{
port: 0,
},
);
port = tempServer.address?.port ?? 3002;
authServerBaseUrl = `http://localhost:${port}`;
authServerUrl = `${authServerBaseUrl}/api/auth`;
await tempServer.close();
});
afterEach(async () => {
if (server) {
await server.close();