mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Refactors, bugfixing
This commit is contained in:
parent
5812618170
commit
e26d604a54
42 changed files with 370 additions and 376 deletions
|
|
@ -172,7 +172,7 @@ describe("API Tests", () => {
|
|||
expect(account.statuses_count).toBe(0);
|
||||
expect(account.note).toBe("");
|
||||
expect(account.url).toBe(
|
||||
`${config.http.base_url}/users/${user.id}`,
|
||||
new URL(`/users/${user.id}`, config.http.base_url).toString(),
|
||||
);
|
||||
expect(account.avatar).toBeDefined();
|
||||
expect(account.avatar_static).toBeDefined();
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ describe("API Tests", () => {
|
|||
"application/json",
|
||||
);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
status = (await response.json()) as APIStatus;
|
||||
expect(status.content).toContain("Hello, world!");
|
||||
expect(status.visibility).toBe("public");
|
||||
|
|
@ -184,7 +183,6 @@ describe("API Tests", () => {
|
|||
"application/json",
|
||||
);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
status2 = (await response.json()) as APIStatus;
|
||||
expect(status2.content).toContain("This is a reply!");
|
||||
expect(status2.visibility).toBe("public");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue