Files
WebAurion-API/tests/ScheduleApi.test.ts
2024-11-17 15:48:57 +01:00

18 lines
624 B
TypeScript

import { login } from "../src/api/Session";
describe("ScheduleApi", () => {
it("should receive a schedule", async () => {
const username = process.env.TEST_USERNAME;
const password = process.env.TEST_PASSWORD;
if (!username || !password) {
throw new Error(
"TEST_USERNAME or TEST_PASSWORD is not set in environment variables.",
);
}
const session = await login(username, password);
const schedule = await session.getScheduleApi().fetchSchedule();
console.log(schedule);
expect(schedule).not.toBeNull();
});
});