Skip to content

Commit 601a5b9

Browse files
committed
update test
1 parent 8798c97 commit 601a5b9

1 file changed

Lines changed: 29 additions & 36 deletions

File tree

src/update.test.ts

Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ it("handles bad values", async () => {
2727
server.get("/Fribb/anime-lists/master/anime-list-mini.json", {
2828
status: 200,
2929
body: [
30-
{ anidb_id: 1337, themoviedb_id: "unknown" },
30+
{ anidb_id: 1337, themoviedb_id: { tv: "unknown" } },
3131
{ anidb_id: 1338, tvdb_id: "unknown" as never },
3232
{ anidb_id: 1339, imdb_id: "tt1337,tt1338,tt1339" },
33-
{ anidb_id: 1340, themoviedb_id: "unknown" },
34-
{ anidb_id: 1341, themoviedb_id: 1341 },
33+
{ anidb_id: 1341, themoviedb_id: { movie: 1341 } },
3534
] satisfies AnimeListsSchema,
3635
})
3736

@@ -43,39 +42,33 @@ it("handles bad values", async () => {
4342
.select(["relations.anidb", "relations.imdb", "relations.themoviedb", "relations.thetvdb"])
4443
.execute(),
4544
).resolves.toMatchInlineSnapshot(`
46-
[
47-
{
48-
"anidb": 1337,
49-
"imdb": null,
50-
"themoviedb": null,
51-
"thetvdb": null,
52-
},
53-
{
54-
"anidb": 1338,
55-
"imdb": null,
56-
"themoviedb": null,
57-
"thetvdb": null,
58-
},
59-
{
60-
"anidb": 1339,
61-
"imdb": null,
62-
"themoviedb": null,
63-
"thetvdb": null,
64-
},
65-
{
66-
"anidb": 1340,
67-
"imdb": null,
68-
"themoviedb": null,
69-
"thetvdb": null,
70-
},
71-
{
72-
"anidb": 1341,
73-
"imdb": null,
74-
"themoviedb": 1341,
75-
"thetvdb": null,
76-
},
77-
]
78-
`)
45+
[
46+
{
47+
"anidb": 1337,
48+
"imdb": null,
49+
"themoviedb": null,
50+
"thetvdb": null,
51+
},
52+
{
53+
"anidb": 1338,
54+
"imdb": null,
55+
"themoviedb": null,
56+
"thetvdb": null,
57+
},
58+
{
59+
"anidb": 1339,
60+
"imdb": null,
61+
"themoviedb": null,
62+
"thetvdb": null,
63+
},
64+
{
65+
"anidb": 1341,
66+
"imdb": null,
67+
"themoviedb": 1341,
68+
"thetvdb": null,
69+
},
70+
]
71+
`)
7972
})
8073

8174
it("handles duplicates", async () => {

0 commit comments

Comments
 (0)