From 4cf9c57a65a0b62706e8ac8cef05f34636319820 Mon Sep 17 00:00:00 2001 From: Ritesh Ghosh Date: Sun, 7 Jan 2024 17:23:46 +0530 Subject: [PATCH] test: using vitest for testing --- test/animeAboutInfo.test.ts | 3 ++- test/animeCategory.test.ts | 3 ++- test/animeGenre.test.ts | 3 ++- test/animeProducer.test.ts | 3 ++- test/animeSearch.test.ts | 3 ++- test/homePage.test.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/animeAboutInfo.test.ts b/test/animeAboutInfo.test.ts index 26c5475..2cdc0cb 100644 --- a/test/animeAboutInfo.test.ts +++ b/test/animeAboutInfo.test.ts @@ -1,4 +1,5 @@ -import { scrapeAnimeAboutInfo } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeAnimeAboutInfo } from "../src/parsers/index.js"; test("returns information about an anime", async () => { const data = await scrapeAnimeAboutInfo("steinsgate-3"); diff --git a/test/animeCategory.test.ts b/test/animeCategory.test.ts index dd20e77..55ad873 100644 --- a/test/animeCategory.test.ts +++ b/test/animeCategory.test.ts @@ -1,4 +1,5 @@ -import { scrapeAnimeCategory } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeAnimeCategory } from "../src/parsers/index.js"; test("returns animes belonging to a category", async () => { const data = await scrapeAnimeCategory("subbed-anime"); diff --git a/test/animeGenre.test.ts b/test/animeGenre.test.ts index 79aa702..9e6610a 100644 --- a/test/animeGenre.test.ts +++ b/test/animeGenre.test.ts @@ -1,4 +1,5 @@ -import { scrapeGenreAnime } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeGenreAnime } from "../src/parsers/index.js"; test("returns animes belonging to a genre", async () => { const data = await scrapeGenreAnime("shounen", 2); diff --git a/test/animeProducer.test.ts b/test/animeProducer.test.ts index a75fa18..ae17c83 100644 --- a/test/animeProducer.test.ts +++ b/test/animeProducer.test.ts @@ -1,4 +1,5 @@ -import { scrapeProducerAnimes } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeProducerAnimes } from "../src/parsers/index.js"; test("returns animes produced by a producer", async () => { const data = await scrapeProducerAnimes("toei-animation", 2); diff --git a/test/animeSearch.test.ts b/test/animeSearch.test.ts index 40b7b59..efd2641 100644 --- a/test/animeSearch.test.ts +++ b/test/animeSearch.test.ts @@ -1,4 +1,5 @@ -import { scrapeAnimeSearch } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeAnimeSearch } from "../src/parsers/index.js"; test("returns animes related to search query", async () => { const data = await scrapeAnimeSearch("monster", 2); diff --git a/test/homePage.test.ts b/test/homePage.test.ts index 4790c97..192a060 100644 --- a/test/homePage.test.ts +++ b/test/homePage.test.ts @@ -1,4 +1,5 @@ -import { scrapeHomePage } from "../src/parsers"; +import { expect, test } from "vitest"; +import { scrapeHomePage } from "../src/parsers/index.js"; test("returns anime information present in homepage", async () => { const data = await scrapeHomePage();