File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,32 @@ describe('Configuration Loading', () => {
219
219
} ,
220
220
) ;
221
221
} ) ;
222
+
223
+ it ( 'extends from another file with different environment' , async ( ) => {
224
+ await withTempFiles (
225
+ {
226
+ '.app-config.yml' : `
227
+ $extends:
228
+ path: ./other-file.yml
229
+ env: production
230
+ bar:
231
+ $envVar: APP_CONFIG_ENV
232
+ ` ,
233
+ 'other-file.yml' : `
234
+ foo:
235
+ $env:
236
+ default: default
237
+ prod: production
238
+ ` ,
239
+ } ,
240
+ async ( inDir ) => {
241
+ expect ( ( await loadUnvalidatedConfig ( { directory : inDir ( '.' ) , environmentOverride : 'test' } ) ) . fullConfig ) . toEqual ( {
242
+ foo : 'production' ,
243
+ bar : 'test' ,
244
+ } ) ;
245
+ } ,
246
+ ) ;
247
+ } ) ;
222
248
} ) ;
223
249
224
250
describe ( 'Configuration Loading Options' , ( ) => {
You can’t perform that action at this time.
0 commit comments