Files
WebAurion-API/tests/NotesApi.test.ts
2024-11-18 11:51:00 +01:00

17 lines
582 B
TypeScript

import { login } from "../src/api/Session";
describe("NotesApi", () => {
it("should receive notes", 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.getNotesApi().fetchNotes();
expect(schedule).not.toBeDefined();
});
});