aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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([]);
+});