refactor: update title controller tests to use async assertion matchers and refine userId type in anilist service.
This commit is contained in:
@@ -51,7 +51,7 @@ describe('requests the "/title" route', () => {
|
||||
headers: new Headers({ "x-anilist-token": "asd" }),
|
||||
});
|
||||
|
||||
expect(await response.json()).toMatchSnapshot();
|
||||
await expect(response.json()).resolves.toMatchSnapshot();
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('requests the "/title" route', () => {
|
||||
|
||||
const response = await app.request("/title?id=10");
|
||||
|
||||
expect(await response.json()).toMatchSnapshot();
|
||||
await expect(response.json()).resolves.toMatchSnapshot();
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('requests the "/title" route', () => {
|
||||
|
||||
const response = await app.request("/title?id=-1");
|
||||
|
||||
expect(await response.json()).toEqual({ success: false });
|
||||
await expect(response.json()).resolves.toEqual({ success: false });
|
||||
expect(response.status).toBe(404);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user