aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-07 20:38:57 +0530
committerRitesh Ghosh <[email protected]>2023-08-07 20:38:57 +0530
commit7533b1e0b445349d521efc9ba03f77e24e4973cb (patch)
tree88443a346161bf6455b1e1948ac5d2d866f42e78
parent59bd46cc3526a70f7ceeb8d7d55e4ff10e8ecb9b (diff)
downloadaniwatch-api-7533b1e0b445349d521efc9ba03f77e24e4973cb.tar.xz
aniwatch-api-7533b1e0b445349d521efc9ba03f77e24e4973cb.zip
test: added animeGenre test
-rw-r--r--test/animeGenre.test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/animeGenre.test.ts b/test/animeGenre.test.ts
new file mode 100644
index 0000000..79aa702
--- /dev/null
+++ b/test/animeGenre.test.ts
@@ -0,0 +1,9 @@
+import { scrapeGenreAnime } from "../src/parsers";
+
+test("returns animes belonging to a genre", async () => {
+ const data = await scrapeGenreAnime("shounen", 2);
+
+ expect(data.animes).not.toEqual([]);
+ expect(data.genres).not.toEqual([]);
+ expect(data.topAiringAnimes).not.toEqual([]);
+});