Skip to content

Commit

Permalink
chore(internal): add test (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jan 20, 2025
1 parent 8383975 commit b7c2d3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 OpenAI({
baseURL: 'http://localhost:5000/',
apiKey: 'My API Key',
fetch: defaultFetch,
});
});

test('custom signal', async () => {
const client = new OpenAI({
baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010',
Expand Down

0 comments on commit b7c2d3d

Please sign in to comment.