test: using vitest for testing
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user