Files
aitbc/packages/js/aitbc-sdk/src/client.test.ts
oib 15427c96c0 chore: update file permissions to executable across repository
- Change file mode from 644 to 755 for all project files
- Add chain_id parameter to get_balance RPC endpoint with default "ait-devnet"
- Rename Miner.extra_meta_data to extra_metadata for consistency
2026-03-06 22:17:54 +01:00

24 lines
702 B
TypeScript
Executable File

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([]);
});
});