From 183cef193ccd72409aac93f073413337cdb8ce9e Mon Sep 17 00:00:00 2001 From: Tokyo Date: Mon, 9 Dec 2024 02:10:29 +0000 Subject: [PATCH] tests --- src/providers/openai.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/providers/openai.test.ts b/src/providers/openai.test.ts index 75a532e..4490bd1 100644 --- a/src/providers/openai.test.ts +++ b/src/providers/openai.test.ts @@ -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', }); @@ -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', }); @@ -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', });