mirror of
https://github.com/dd060606/WebAurion-API.git
synced 2026-01-18 16:47:26 +01:00
feat: can get schedule using a week number
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { login } from "../src/api/Session";
|
||||
import { getScheduleDates } from "../src/utils/PlanningUtils";
|
||||
describe("PlanningApi", () => {
|
||||
it("should receive a planning", async () => {
|
||||
const username = process.env.TEST_USERNAME;
|
||||
@@ -14,4 +15,12 @@ describe("PlanningApi", () => {
|
||||
console.log(planning);
|
||||
expect(planning).toBeInstanceOf(Array);
|
||||
});
|
||||
it("should get schedule dates from week number", async () => {
|
||||
const { startTimestamp, endTimestamp } = getScheduleDates(3);
|
||||
console.log(
|
||||
new Date(startTimestamp).toLocaleString(),
|
||||
new Date(endTimestamp).toLocaleString(),
|
||||
);
|
||||
expect(startTimestamp).toBeLessThan(endTimestamp);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user