Files
eklase-api-wrapper/tests/EklaseAuthClient.test.ts
2026-01-29 16:45:05 +02:00

17 lines
468 B
TypeScript

import { test, expect } from "bun:test";
import { APIClient } from "../src/Client";
test.todo("Authenticated API request", async () => {
const client = new APIClient({
username: process.env.USERNAME!,
password: process.env.PASSWORD!
});
const token = await client.getToken();
expect(typeof token.token).toBe("string");
console.log(token);
const user = await client.apiRequest("https://family.e-klase.lv/api/user");
console.log(await user.json());
}, 0);