@@ -33,13 +33,21 @@ describe('Firebase Functions > Service', () => {
33
33
) ;
34
34
} ) ;
35
35
36
- it ( 'can use emulator' , ( ) => {
36
+ it ( 'can use emulator (deprecated) ' , ( ) => {
37
37
service . useFunctionsEmulator ( 'http://localhost:5005' ) ;
38
38
assert . equal (
39
39
service . _url ( 'foo' ) ,
40
40
'http://localhost:5005/my-project/us-central1/foo'
41
41
) ;
42
42
} ) ;
43
+
44
+ it ( 'can use emulator' , ( ) => {
45
+ service . useEmulator ( 'localhost' , 5005 ) ;
46
+ assert . equal (
47
+ service . _url ( 'foo' ) ,
48
+ 'http://localhost:5005/my-project/us-central1/foo'
49
+ ) ;
50
+ } ) ;
43
51
} ) ;
44
52
45
53
describe ( 'custom region/domain constructor' , ( ) => {
@@ -62,13 +70,22 @@ describe('Firebase Functions > Service', () => {
62
70
assert . equal ( service . _url ( 'foo' ) , 'https://mydomain.com/foo' ) ;
63
71
} ) ;
64
72
65
- it ( 'prefers emulator to custom domain' , ( ) => {
73
+ it ( 'prefers emulator to custom domain (deprecated) ' , ( ) => {
66
74
const service = createTestService ( app , 'https://mydomain.com' ) ;
67
75
service . useFunctionsEmulator ( 'http://localhost:5005' ) ;
68
76
assert . equal (
69
77
service . _url ( 'foo' ) ,
70
78
'http://localhost:5005/my-project/us-central1/foo'
71
79
) ;
72
80
} ) ;
81
+
82
+ it ( 'prefers emulator to custom domain' , ( ) => {
83
+ const service = createTestService ( app , 'https://mydomain.com' ) ;
84
+ service . useEmulator ( 'localhost' , 5005 ) ;
85
+ assert . equal (
86
+ service . _url ( 'foo' ) ,
87
+ 'http://localhost:5005/my-project/us-central1/foo'
88
+ ) ;
89
+ } ) ;
73
90
} ) ;
74
91
} ) ;
0 commit comments