feat: add foreign key constraints and metrics for blockchain node
This commit is contained in:
23
packages/js/aitbc-sdk/src/client.test.ts
Normal file
23
packages/js/aitbc-sdk/src/client.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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([]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user