fix: test failures

This commit is contained in:
2024-10-05 16:48:31 -04:00
parent 5ea90bda55
commit 271ea01b21
9 changed files with 739 additions and 58 deletions

View File

@@ -149,18 +149,22 @@ describe("requests the /watch-status route", () => {
.insert(deviceTokensTable)
.values({ deviceId: "123", token: "asd" });
const res = await app.request("/watch-status", {
method: "POST",
headers: new Headers({
"x-anilist-token": "asd",
"Content-Type": "application/json",
}),
body: JSON.stringify({
deviceId: "123",
watchStatus: null,
titleId: 139518,
}),
});
const res = await app.request(
"/watch-status",
{
method: "POST",
headers: new Headers({
"x-anilist-token": "asd",
"Content-Type": "application/json",
}),
body: JSON.stringify({
deviceId: "123",
watchStatus: null,
titleId: 139518,
}),
},
getTestEnv(),
);
expect(res.json()).resolves.toEqual({ success: true });
expect(res.status).toBe(200);