From 12512e5cf67f3ffab2c23277e77e2bef344a36a8 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 (#604) --- tests/index.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/index.test.ts b/tests/index.test.ts index 82d32f2d..fed605c2 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 Lithic({ + baseURL: 'http://localhost:5000/', + apiKey: 'My Lithic API Key', + fetch: defaultFetch, + }); + }); + test('custom signal', async () => { const client = new Lithic({ baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',