We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4572478 commit 3ec7d1aCopy full SHA for 3ec7d1a
tests/index.test.ts
@@ -96,6 +96,15 @@ describe('instantiate client', () => {
96
expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true });
97
});
98
99
+ test('explicit global fetch', async () => {
100
+ // make sure the global fetch type is assignable to our Fetch type
101
+ const client = new Anthropic({
102
+ baseURL: 'http://localhost:5000/',
103
+ apiKey: 'my-anthropic-api-key',
104
+ fetch: defaultFetch,
105
+ });
106
107
+
108
test('custom signal', async () => {
109
const client = new Anthropic({
110
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
0 commit comments