From c8b598a3dd5f37f157f437b51331a06cce42d525 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 18:01:24 +0000 Subject: [PATCH] chore(internal): add test (#515) --- tests/index.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/index.test.ts b/tests/index.test.ts index e85416b..939c844 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -101,6 +101,16 @@ 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 ModernTreasury({ + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + organizationId: 'my-organization-ID', + fetch: defaultFetch, + }); + }); + test('custom signal', async () => { const client = new ModernTreasury({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',