Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tokyo committed Dec 9, 2024
1 parent 6154025 commit 183cef1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/openai.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ describe('OpenAI Provider', () => {

// Ensure OpenAI constructor was called with the provided API key
expect(OpenAI).toHaveBeenCalledWith({
dangerouslyAllowBrowser: true,
apiKey: 'provided-api-key',
});

Expand All @@ -53,6 +54,7 @@ describe('OpenAI Provider', () => {

// Ensure OpenAI constructor was called with the API key from environment variables
expect(OpenAI).toHaveBeenCalledWith({
dangerouslyAllowBrowser: true,
apiKey: 'env-api-key',
});

Expand All @@ -72,6 +74,7 @@ describe('OpenAI Provider', () => {

// Ensure OpenAI constructor was called with the provided API key, not the environment variable
expect(OpenAI).toHaveBeenCalledWith({
dangerouslyAllowBrowser: true,
apiKey: 'provided-api-key',
});

Expand Down

0 comments on commit 183cef1

Please sign in to comment.