@@ -38,7 +38,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
38
38
functionAppDirectory : null ,
39
39
} ,
40
40
} ) ;
41
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 2 ) , msg . envReload . response ) ;
41
+ await stream . assertCalledWith (
42
+ msg . envReload . funcAppDirNotDefined ,
43
+ msg . envReload . reloadEnvVarsLog ( 2 ) ,
44
+ msg . envReload . response
45
+ ) ;
42
46
expect ( process . env . hello ) . to . equal ( 'world' ) ;
43
47
expect ( process . env . SystemDrive ) . to . equal ( 'Q:' ) ;
44
48
expect ( process . env . PlaceholderVariable ) . to . be . undefined ;
@@ -56,7 +60,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
56
60
functionAppDirectory : null ,
57
61
} ,
58
62
} ) ;
59
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 2 ) , msg . envReload . response ) ;
63
+ await stream . assertCalledWith (
64
+ msg . envReload . funcAppDirNotDefined ,
65
+ msg . envReload . reloadEnvVarsLog ( 2 ) ,
66
+ msg . envReload . response
67
+ ) ;
60
68
expect ( process . env . hello ) . to . equal ( 'world' ) ;
61
69
expect ( process . env . SystemDrive ) . to . equal ( 'Q:' ) ;
62
70
expect ( process . env . PlaceholderVariable ) . to . be . undefined ;
@@ -80,7 +88,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
80
88
functionAppDirectory : null ,
81
89
} ,
82
90
} ) ;
83
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 0 ) , msg . envReload . response ) ;
91
+ await stream . assertCalledWith (
92
+ msg . envReload . funcAppDirNotDefined ,
93
+ msg . envReload . reloadEnvVarsLog ( 0 ) ,
94
+ msg . envReload . response
95
+ ) ;
84
96
expect ( process . env ) . to . be . empty ;
85
97
} ) ;
86
98
@@ -92,7 +104,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
92
104
functionAppDirectory : null ,
93
105
} ,
94
106
} ) ;
95
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 0 ) , msg . envReload . response ) ;
107
+ await stream . assertCalledWith (
108
+ msg . envReload . funcAppDirNotDefined ,
109
+ msg . envReload . reloadEnvVarsLog ( 0 ) ,
110
+ msg . envReload . response
111
+ ) ;
96
112
97
113
stream . addTestMessage ( {
98
114
requestId : 'testReqId' ,
@@ -108,7 +124,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
108
124
functionAppDirectory : null ,
109
125
} ,
110
126
} ) ;
111
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 0 ) , msg . envReload . response ) ;
127
+ await stream . assertCalledWith (
128
+ msg . envReload . funcAppDirNotDefined ,
129
+ msg . envReload . reloadEnvVarsLog ( 0 ) ,
130
+ msg . envReload . response
131
+ ) ;
112
132
} ) ;
113
133
114
134
it ( 'reloads environment variable and keeps cwd without functionAppDirectory' , async ( ) => {
@@ -123,7 +143,11 @@ describe('FunctionEnvironmentReloadHandler', () => {
123
143
functionAppDirectory : null ,
124
144
} ,
125
145
} ) ;
126
- await stream . assertCalledWith ( msg . envReload . reloadEnvVarsLog ( 2 ) , msg . envReload . response ) ;
146
+ await stream . assertCalledWith (
147
+ msg . envReload . funcAppDirNotDefined ,
148
+ msg . envReload . reloadEnvVarsLog ( 2 ) ,
149
+ msg . envReload . response
150
+ ) ;
127
151
expect ( process . env . hello ) . to . equal ( 'world' ) ;
128
152
expect ( process . env . SystemDrive ) . to . equal ( 'Q:' ) ;
129
153
expect ( process . cwd ( ) == cwd ) ;
@@ -181,6 +205,7 @@ describe('FunctionEnvironmentReloadHandler', () => {
181
205
} ,
182
206
} ) ;
183
207
await stream . assertCalledWith (
208
+ msg . envReload . funcAppDirNotChanged ,
184
209
msg . envReload . reloadEnvVarsLog ( 0 ) ,
185
210
msg . envReload . changingCwdLog ( testAppPath ) ,
186
211
msg . envReload . response
0 commit comments