Skip to content

Commit cf753e0

Browse files
committed
test(database): defer emulator connection until test runs
that way if other tests need to use cloud database vs emulator, it is still possible until this test is run
1 parent 6140714 commit cf753e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/local-tests/database/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ import {
1313
connectDatabaseEmulator,
1414
} from '@react-native-firebase/database';
1515

16-
connectDatabaseEmulator(getDatabase(), '127.0.0.1', 9000);
17-
1816
export function DatabaseOnChildMovedTest() {
17+
// Defer connecting to the emulator until we display
18+
connectDatabaseEmulator(getDatabase(), '127.0.0.1', 9000);
19+
1920
return (
2021
<View>
2122
<Text>text text text</Text>

0 commit comments

Comments
 (0)