File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -294,9 +294,12 @@ describe('Database Tests', () => {
294294
295295 it ( 'uses ssl when useEmulator is called with ssl specified' , ( ) => {
296296 const db = firebase . database ( ) ;
297- db . useEmulator ( 'localhost' , 80 , { ssl : true } ) ;
297+ const cloudWorkstation = 'abc.cloudworkstations.dev' ;
298+ db . useEmulator ( cloudWorkstation , 80 ) ;
298299 expect ( ( db as any ) . _delegate . _repo . repoInfo_ . isUsingEmulator ) . to . be . true ;
299- expect ( ( db as any ) . _delegate . _repo . repoInfo_ . host ) . to . equal ( 'localhost:80' ) ;
300+ expect ( ( db as any ) . _delegate . _repo . repoInfo_ . host ) . to . equal (
301+ `${ cloudWorkstation } :80`
302+ ) ;
300303 expect ( ( db as any ) . _delegate . _repo . repoInfo_ . secure ) . to . be . true ;
301304 } ) ;
302305
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ function repoManagerApplyEmulatorSettings(
9191 tokenProvider ?: AuthTokenProvider
9292) : void {
9393 const portIndex = hostAndPort . lastIndexOf ( ':' ) ;
94- const host = hostAndPort . substring ( portIndex ) ;
94+ const host = hostAndPort . substring ( 0 , portIndex ) ;
9595 const useSsl = isCloudWorkstation ( host ) ;
9696 repo . repoInfo_ = new RepoInfo (
9797 hostAndPort ,
You can’t perform that action at this time.
0 commit comments