@@ -10,10 +10,6 @@ jest.mock("./fromSharedConfigFiles");
1010jest . mock ( "@aws-sdk/property-provider" ) ;
1111
1212describe ( "loadConfig" , ( ) => {
13- const configuration : SharedConfigInit = {
14- profile : "profile" ,
15- } ;
16-
1713 afterEach ( ( ) => {
1814 jest . clearAllMocks ( ) ;
1915 } ) ;
@@ -28,18 +24,15 @@ describe("loadConfig", () => {
2824 const envVarSelector = ( env : NodeJS . ProcessEnv ) => env [ "AWS_CONFIG_FOO" ] ;
2925 const configKey = ( profile : Profile ) => profile [ "aws_config_foo" ] ;
3026 const defaultValue = "foo-value" ;
31- loadConfig (
32- {
33- environmentVariableSelector : envVarSelector ,
34- configFileSelector : configKey ,
35- default : defaultValue ,
36- } ,
37- configuration
38- ) ;
27+ loadConfig ( {
28+ environmentVariableSelector : envVarSelector ,
29+ configFileSelector : configKey ,
30+ default : defaultValue ,
31+ } ) ;
3932 expect ( fromEnv ) . toHaveBeenCalledTimes ( 1 ) ;
4033 expect ( fromEnv ) . toHaveBeenCalledWith ( envVarSelector ) ;
4134 expect ( fromSharedConfigFiles ) . toHaveBeenCalledTimes ( 1 ) ;
42- expect ( fromSharedConfigFiles ) . toHaveBeenCalledWith ( configKey , configuration ) ;
35+ expect ( fromSharedConfigFiles ) . toHaveBeenCalledWith ( configKey , { } ) ;
4336 expect ( fromStatic ) . toHaveBeenCalledTimes ( 1 ) ;
4437 expect ( fromStatic ) . toHaveBeenCalledWith ( defaultValue ) ;
4538 expect ( chain ) . toHaveBeenCalledTimes ( 1 ) ;
0 commit comments