mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-25 00:22:43 -05:00
test: no async describe
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user