Some checks failed
JavaScript SDK Tests / test-js-sdk (push) Failing after 9s
package-tests / test-python-packages (map[name:aitbc-agent-sdk path:packages/py/aitbc-agent-sdk python_version:3.13]) (push) Failing after 10s
package-tests / test-python-packages (map[name:aitbc-core path:packages/py/aitbc-core python_version:3.13]) (push) Failing after 10s
integration-tests / test-service-integration (push) Has been cancelled
package-tests / test-python-packages (map[name:aitbc-crypto path:packages/py/aitbc-crypto python_version:3.13]) (push) Has been cancelled
package-tests / test-javascript-packages (map[name:aitbc-sdk node_version:24 path:packages/js/aitbc-sdk]) (push) Has been cancelled
package-tests / test-python-packages (map[name:aitbc-sdk path:packages/py/aitbc-sdk python_version:3.13]) (push) Has been cancelled
package-tests / cross-language-compatibility (push) Has been cancelled
package-tests / package-integration-tests (push) Has been cancelled
security-scanning / audit (push) Has been cancelled
24 lines
704 B
TypeScript
24 lines
704 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { AitbcClient } from "./client";
|
|
|
|
const createClient = () =>
|
|
new AitbcClient({
|
|
baseUrl: "https://api.example.com",
|
|
apiKey: "test-key",
|
|
fetchImpl: async (_input: RequestInfo | URL, _init?: RequestInit) =>
|
|
new Response(JSON.stringify({ job_id: "job", candidates: [] }), {
|
|
status: 200,
|
|
headers: { "Content-Type": "application/json" },
|
|
}),
|
|
});
|
|
|
|
describe("AitbcClient", () => {
|
|
it("sends match requests", async () => {
|
|
const client = createClient();
|
|
const response = await client.match({ jobId: "job" });
|
|
expect(response.jobId).toBe("job");
|
|
expect(response.candidates).toEqual([]);
|
|
});
|
|
});
|