From e670066b42925a3bb84115a5ef1df3df70ea37f6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 17:58:52 +0000 Subject: [PATCH] chore(internal): add test (#660) --- tests/index.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/index.test.ts b/tests/index.test.ts index 9402a819..bc0c1645 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -96,6 +96,15 @@ describe('instantiate client', () => { expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); }); + test('explicit global fetch', async () => { + // make sure the global fetch type is assignable to our Fetch type + const client = new Anthropic({ + baseURL: 'http://localhost:5000/', + apiKey: 'my-anthropic-api-key', + fetch: defaultFetch, + }); + }); + test('custom signal', async () => { const client = new Anthropic({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',