aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-07 20:38:43 +0530
committerRitesh Ghosh <[email protected]>2023-08-07 20:38:43 +0530
commit59bd46cc3526a70f7ceeb8d7d55e4ff10e8ecb9b (patch)
treed556daf93d292e023d5682c27b683dfaa78becb3 /test
parentfe1608b360b6143df499a13817d8e44f9376c10e (diff)
downloadaniwatch-api-59bd46cc3526a70f7ceeb8d7d55e4ff10e8ecb9b.tar.xz
aniwatch-api-59bd46cc3526a70f7ceeb8d7d55e4ff10e8ecb9b.zip
test: added animeCategory test
Diffstat (limited to 'test')
-rw-r--r--test/animeCategory.test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/animeCategory.test.ts b/test/animeCategory.test.ts
new file mode 100644
index 0000000..dd20e77
--- /dev/null
+++ b/test/animeCategory.test.ts
@@ -0,0 +1,11 @@
+import { scrapeAnimeCategory } from "../src/parsers";
+
+test("returns animes belonging to a category", async () => {
+ const data = await scrapeAnimeCategory("subbed-anime");
+
+ expect(data.animes).not.toEqual([]);
+ expect(data.genres).not.toEqual([]);
+ expect(data.top10Animes.today).not.toEqual([]);
+ expect(data.top10Animes.week).not.toEqual([]);
+ expect(data.top10Animes.month).not.toEqual([]);
+});