mirror of
https://github.com/dd060606/WebAurion-API.git
synced 2026-01-18 16:47:26 +01:00
18 lines
561 B
TypeScript
18 lines
561 B
TypeScript
import Session from "../src/api/Session";
|
|
describe("AuthApi", () => {
|
|
it("should log in a user and receive a session", 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 = new Session();
|
|
await session.login(username, password);
|
|
|
|
expect(session).toBeDefined();
|
|
});
|
|
});
|