aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2023-08-07 20:38:30 +0530
committerRitesh Ghosh <[email protected]>2023-08-07 20:38:30 +0530
commitfe1608b360b6143df499a13817d8e44f9376c10e (patch)
tree183187f49f81162e99c6c838a38ac162181390ae
parent01c93fc1afa6f288a3324bf98c77177c01467e51 (diff)
downloadaniwatch-api-fe1608b360b6143df499a13817d8e44f9376c10e.tar.xz
aniwatch-api-fe1608b360b6143df499a13817d8e44f9376c10e.zip
test: added animeAboutInfo test
-rw-r--r--test/animeAboutInfo.test.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/animeAboutInfo.test.ts b/test/animeAboutInfo.test.ts
new file mode 100644
index 0000000..26c5475
--- /dev/null
+++ b/test/animeAboutInfo.test.ts
@@ -0,0 +1,10 @@
+import { scrapeAnimeAboutInfo } from "../src/parsers";
+
+test("returns information about an anime", async () => {
+ const data = await scrapeAnimeAboutInfo("steinsgate-3");
+
+ expect(data.anime.info.name).not.toEqual(null);
+ expect(data.recommendedAnimes).not.toEqual([]);
+ expect(data.mostPopularAnimes).not.toEqual([]);
+ expect(Object.keys(data.anime.moreInfo)).not.toEqual([]);
+});