test: add response snapshots for larger responses
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`requests the "/episodes" route with list of episodes from Anify 1`] = `
|
||||
{
|
||||
"result": {
|
||||
"episodes": [
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=103233",
|
||||
"img": null,
|
||||
"number": 1,
|
||||
"rating": null,
|
||||
"title": "Mission: Forgetter I",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=103632",
|
||||
"img": null,
|
||||
"number": 2,
|
||||
"rating": null,
|
||||
"title": "Mission: Forgetter II",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=104244",
|
||||
"img": null,
|
||||
"number": 3,
|
||||
"rating": null,
|
||||
"title": "Mission: Forgetter III",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=104620",
|
||||
"img": null,
|
||||
"number": 4,
|
||||
"rating": null,
|
||||
"title": "Mission: Forgetter IV",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=104844",
|
||||
"img": null,
|
||||
"number": 5,
|
||||
"rating": null,
|
||||
"title": "File: Glint",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=105761",
|
||||
"img": null,
|
||||
"number": 6,
|
||||
"rating": null,
|
||||
"title": "File: Dreamspeaker Thea",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=106135",
|
||||
"img": null,
|
||||
"number": 7,
|
||||
"rating": null,
|
||||
"title": "File: Forgetter Annette",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=106518",
|
||||
"img": null,
|
||||
"number": 8,
|
||||
"rating": null,
|
||||
"title": "Mission: Dreamspeaker I",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=106606",
|
||||
"img": null,
|
||||
"number": 9,
|
||||
"rating": null,
|
||||
"title": "Mission: Dreamspeaker II",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=106981",
|
||||
"img": null,
|
||||
"number": 10,
|
||||
"rating": null,
|
||||
"title": "Mission: Dreamspeaker III",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=107176",
|
||||
"img": null,
|
||||
"number": 11,
|
||||
"rating": null,
|
||||
"title": "Mission: Dreamspeaker IV",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
{
|
||||
"description": null,
|
||||
"id": "/watch/spy-classroom-season-2-18468?ep=107247",
|
||||
"img": null,
|
||||
"number": 12,
|
||||
"rating": null,
|
||||
"title": "File: Flower Garden Lily",
|
||||
"updatedAt": 0,
|
||||
},
|
||||
],
|
||||
"providerId": "zoro",
|
||||
},
|
||||
"success": true,
|
||||
}
|
||||
`;
|
||||
@@ -17,122 +17,7 @@ describe('requests the "/episodes" route', () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(response.json()).resolves.toEqual({
|
||||
success: true,
|
||||
result: {
|
||||
providerId: "zoro",
|
||||
episodes: [
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=103233",
|
||||
number: 1,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Forgetter I",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=103632",
|
||||
number: 2,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Forgetter II",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=104244",
|
||||
number: 3,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Forgetter III",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=104620",
|
||||
number: 4,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Forgetter IV",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=104844",
|
||||
number: 5,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "File: Glint",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=105761",
|
||||
number: 6,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "File: Dreamspeaker Thea",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=106135",
|
||||
number: 7,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "File: Forgetter Annette",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=106518",
|
||||
number: 8,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Dreamspeaker I",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=106606",
|
||||
number: 9,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Dreamspeaker II",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=106981",
|
||||
number: 10,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Dreamspeaker III",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=107176",
|
||||
number: 11,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "Mission: Dreamspeaker IV",
|
||||
updatedAt: 0,
|
||||
},
|
||||
{
|
||||
id: "/watch/spy-classroom-season-2-18468?ep=107247",
|
||||
number: 12,
|
||||
description: null,
|
||||
img: null,
|
||||
rating: null,
|
||||
title: "File: Flower Garden Lily",
|
||||
updatedAt: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
expect(response.json()).resolves.toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("Anify ID filtered out, returns no episode list from Anify", async () => {
|
||||
|
||||
Reference in New Issue
Block a user