Skip to content

Commit 99c9ee0

Browse files
committed
test: update configLoader.spec.ts
1 parent d8fa884 commit 99c9ee0

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

packages/node-config-provider/src/configLoader.spec.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ jest.mock("./fromSharedConfigFiles");
1010
jest.mock("@aws-sdk/property-provider");
1111

1212
describe("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

Comments
 (0)