refactor: update estimated schedule test to use current date

This commit is contained in:
Ritesh Ghosh
2024-07-14 00:07:31 +05:30
parent cb113cb38a
commit e84ba45e39
+4 -1
View File
@@ -2,7 +2,10 @@ import { expect, test } from "vitest";
import { scrapeEstimatedSchedule } from "../src/parsers/index.js"; import { scrapeEstimatedSchedule } from "../src/parsers/index.js";
test("returns estimated schedule anime release", async () => { test("returns estimated schedule anime release", async () => {
const data = await scrapeEstimatedSchedule("2024-03-30"); const d = new Date();
const data = await scrapeEstimatedSchedule(
`${d.getFullYear()}-${d.getMonth() + 1}-${d.getDate()}`
);
expect(data.scheduledAnimes).not.toEqual([]); expect(data.scheduledAnimes).not.toEqual([]);
}); });