@@ -141,42 +141,36 @@ describe('Database@exp Tests', () => {
141141 unsubscribe ( ) ;
142142 } ) ;
143143
144- it ( 'can connect to emulator' , async ( ) => {
145- if ( USE_EMULATOR ) {
144+ if ( USE_EMULATOR ) {
145+ it ( 'can connect to emulator' , async ( ) => {
146146 const db = getDatabase ( defaultApp ) ;
147147 connectDatabaseEmulator ( db , 'localhost' , parseInt ( EMULATOR_PORT , 10 ) ) ;
148148 await get ( refFromURL ( db , `${ DATABASE_ADDRESS } /foo/bar` ) ) ;
149- }
150- } ) ;
151- it ( 'can change emulator config before network operations' , async ( ) => {
152- if ( USE_EMULATOR ) {
149+ } ) ;
150+ it ( 'can change emulator config before network operations' , async ( ) => {
153151 const db = getDatabase ( defaultApp ) ;
154152 const port = parseInt ( EMULATOR_PORT , 10 ) ;
155153 connectDatabaseEmulator ( db , 'localhost' , port + 1 ) ;
156154 connectDatabaseEmulator ( db , 'localhost' , port ) ;
157155 await get ( refFromURL ( db , `${ DATABASE_ADDRESS } /foo/bar` ) ) ;
158- }
159- } ) ;
160- it ( 'can connect to emulator after network operations with same parameters' , async ( ) => {
161- if ( USE_EMULATOR ) {
156+ } ) ;
157+ it ( 'can connect to emulator after network operations with same parameters' , async ( ) => {
162158 const db = getDatabase ( defaultApp ) ;
163159 const port = parseInt ( EMULATOR_PORT , 10 ) ;
164160 connectDatabaseEmulator ( db , 'localhost' , port ) ;
165161 await get ( refFromURL ( db , `${ DATABASE_ADDRESS } /foo/bar` ) ) ;
166162 connectDatabaseEmulator ( db , 'localhost' , port ) ;
167- }
168- } ) ;
169- it ( 'cannot connect to emulator after network operations with different parameters' , async ( ) => {
170- if ( USE_EMULATOR ) {
163+ } ) ;
164+ it ( 'cannot connect to emulator after network operations with different parameters' , async ( ) => {
171165 const db = getDatabase ( defaultApp ) ;
172166 const port = parseInt ( EMULATOR_PORT , 10 ) ;
173167 connectDatabaseEmulator ( db , 'localhost' , port ) ;
174168 await get ( refFromURL ( db , `${ DATABASE_ADDRESS } /foo/bar` ) ) ;
175169 expect ( ( ) => {
176170 connectDatabaseEmulator ( db , 'localhost' , 9001 ) ;
177171 } ) . to . throw ( ) ;
178- }
179- } ) ;
172+ } ) ;
173+ }
180174
181175 it ( 'can properly handle unknown deep merges' , async ( ) => {
182176 // Note: This test requires `testIndex` to be added as an index.
0 commit comments