@@ -20,7 +20,8 @@ import {
2020 FunctionCallingMode ,
2121 AI ,
2222 InferenceMode ,
23- AIErrorCode
23+ AIErrorCode ,
24+ ChromeAdapter
2425} from '../public-types' ;
2526import * as request from '../requests/request' ;
2627import { SinonStub , match , restore , stub } from 'sinon' ;
@@ -30,9 +31,9 @@ import {
3031} from '../../test-utils/mock-response' ;
3132import sinonChai from 'sinon-chai' ;
3233import { VertexAIBackend } from '../backend' ;
33- import { ChromeAdapterImpl } from '../methods/chrome-adapter' ;
3434import { AIError } from '../errors' ;
3535import chaiAsPromised from 'chai-as-promised' ;
36+ import { fakeChromeAdapter } from '../../test-utils/get-fake-firebase-services' ;
3637
3738use ( sinonChai ) ;
3839use ( chaiAsPromised ) ;
@@ -51,12 +52,6 @@ const fakeAI: AI = {
5152 location : 'us-central1'
5253} ;
5354
54- const fakeChromeAdapter = new ChromeAdapterImpl (
55- // @ts -expect-error
56- undefined ,
57- InferenceMode . PREFER_ON_DEVICE
58- ) ;
59-
6055describe ( 'GenerativeModel' , ( ) => {
6156 it ( 'passes params through to generateContent' , async ( ) => {
6257 const genModel = new GenerativeModel (
@@ -436,7 +431,7 @@ describe('GenerativeModel', () => {
436431
437432describe ( 'GenerativeModel dispatch logic' , ( ) => {
438433 let makeRequestStub : SinonStub ;
439- let mockChromeAdapter : ChromeAdapterImpl ;
434+ let mockChromeAdapter : ChromeAdapter ;
440435
441436 function stubMakeRequest ( stream ?: boolean ) : void {
442437 if ( stream ) {
0 commit comments