@@ -249,10 +249,10 @@ describe('ChatSession', () => {
249249 expect ( consoleStub ) . to . not . have . been . called ;
250250 } ) ;
251251 it ( 'singleRequestOptions overrides requestOptions' , async ( ) => {
252- const generateContentStub = stub (
252+ const generateContentStreamStub = stub (
253253 generateContentMethods ,
254- 'generateContent '
255- ) . rejects ( 'generateContent failed' ) ; // not important
254+ 'generateContentStream '
255+ ) . rejects ( 'generateContentStream failed' ) ; // not important
256256 const requestOptions = {
257257 timeout : 1000
258258 } ;
@@ -266,9 +266,9 @@ describe('ChatSession', () => {
266266 undefined ,
267267 requestOptions
268268 ) ;
269- await expect ( chatSession . sendMessage ( 'hello' , singleRequestOptions ) ) . to . be
269+ await expect ( chatSession . sendMessageStream ( 'hello' , singleRequestOptions ) ) . to . be
270270 . rejected ;
271- expect ( generateContentStub ) . to . be . calledWith (
271+ expect ( generateContentStreamStub ) . to . be . calledWith (
272272 fakeApiSettings ,
273273 'a-model' ,
274274 match . any ,
@@ -279,10 +279,10 @@ describe('ChatSession', () => {
279279 ) ;
280280 } ) ;
281281 it ( 'singleRequestOptions is merged with requestOptions' , async ( ) => {
282- const generateContentStub = stub (
282+ const generateContentStreamStub = stub (
283283 generateContentMethods ,
284- 'generateContent '
285- ) . rejects ( 'generateContent failed' ) ; // not important
284+ 'generateContentStream '
285+ ) . rejects ( 'generateContentStream failed' ) ; // not important
286286 const abortController = new AbortController ( ) ;
287287 const requestOptions = {
288288 timeout : 1000
@@ -297,9 +297,9 @@ describe('ChatSession', () => {
297297 undefined ,
298298 requestOptions
299299 ) ;
300- await expect ( chatSession . sendMessage ( 'hello' , singleRequestOptions ) ) . to . be
300+ await expect ( chatSession . sendMessageStream ( 'hello' , singleRequestOptions ) ) . to . be
301301 . rejected ;
302- expect ( generateContentStub ) . to . be . calledWith (
302+ expect ( generateContentStreamStub ) . to . be . calledWith (
303303 fakeApiSettings ,
304304 'a-model' ,
305305 match . any ,
0 commit comments