aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2024-03-03 23:10:02 +0530
committerRitesh Ghosh <[email protected]>2024-03-03 23:10:02 +0530
commit0b384cf1cc2824d41bd9baa6704d1df51d0fccc7 (patch)
treed3cd51cbe6545830066fe9eb9c62bdba1d286766 /test
parent78eab220b633129d4711090786f583bc8b437a13 (diff)
downloadaniwatch-api-0b384cf1cc2824d41bd9baa6704d1df51d0fccc7.tar.xz
aniwatch-api-0b384cf1cc2824d41bd9baa6704d1df51d0fccc7.zip
test: add animeEpisodes test
Diffstat (limited to 'test')
-rw-r--r--test/animeEpisodes.test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/animeEpisodes.test.ts b/test/animeEpisodes.test.ts
new file mode 100644
index 0000000..f727056
--- /dev/null
+++ b/test/animeEpisodes.test.ts
@@ -0,0 +1,9 @@
+import { expect, test } from "vitest";
+import { scrapeAnimeEpisodes } from "../src/parsers/index.js";
+
+test("returns episodes info of an anime", async () => {
+ const data = await scrapeAnimeEpisodes("steinsgate-3");
+
+ expect(data.totalEpisodes).not.toEqual(0);
+ expect(data.episodes).not.toEqual([]);
+});