mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Fix build errors and testing errors
This commit is contained in:
parent
f02344fa0d
commit
d6f1cd1347
55 changed files with 251 additions and 227 deletions
|
|
@ -83,11 +83,14 @@ describe("POST /auth/login/", () => {
|
|||
|
||||
expect(response.status).toBe(302);
|
||||
expect(response.headers.get("Location")).toMatch(
|
||||
/https:\/\/example.com\?code=/
|
||||
/^\/oauth\/redirect\?redirect_uri=https%3A%2F%2Fexample.com&code=[a-f0-9]+&client_id=[a-zA-Z0-9_-]+&application=Test\+Application&website=https%3A%2F%2Fexample.com&scope=read\+write$/
|
||||
);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
||||
code = response.headers.get("location")?.split("=")[1] || "";
|
||||
code =
|
||||
new URL(
|
||||
response.headers.get("Location") ?? "",
|
||||
"http://lysand.localhost:8080"
|
||||
).searchParams.get("code") ?? "";
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue