mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-26 23:05:11 +08:00
[tests][android][storage] test emulator origin points to 10.0.2.2 when specifying localhost/127.0.0.1 origins.
This commit is contained in:
@@ -66,6 +66,16 @@ describe('functions()', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('useFunctionsEmulator -> uses 10.0.2.2', async () => {
|
||||
const region = 'europe-west2';
|
||||
const functions = firebase.app().functions(region);
|
||||
|
||||
functions.useFunctionsEmulator('http://localhost');
|
||||
functions._useFunctionsEmulatorOrigin.should.equal('http://10.0.2.2');
|
||||
functions.useFunctionsEmulator('http://127.0.0.1');
|
||||
functions._useFunctionsEmulatorOrigin.should.equal('http://10.0.2.2');
|
||||
});
|
||||
|
||||
it('useFunctionsEmulator', async () => {
|
||||
const region = 'europe-west2';
|
||||
const fnName = 'invertaseReactNativeFirebaseFunctionsEmulator';
|
||||
|
||||
Reference in New Issue
Block a user