diff --git a/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.spec.ts b/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.spec.ts new file mode 100644 index 000000000000..b1de6c8634ff --- /dev/null +++ b/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.spec.ts @@ -0,0 +1,10 @@ +import { resolveAwsSdkSigV4AConfig } from "./resolveAwsSdkSigV4AConfig"; + +describe(resolveAwsSdkSigV4AConfig.name, () => { + it("should normalize provider but default to undefined value", async () => { + const config = resolveAwsSdkSigV4AConfig({}); + + expect(typeof config.sigv4aSigningRegionSet).toEqual("function"); + expect(await config.sigv4aSigningRegionSet()).toEqual(undefined); + }); +}); diff --git a/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts b/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts index 9d210b451790..ab7eee8424c9 100644 --- a/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts +++ b/packages/core/src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts @@ -39,7 +39,7 @@ export interface AwsSdkSigV4AAuthResolvedConfig { export const resolveAwsSdkSigV4AConfig = ( config: T & AwsSdkSigV4AAuthInputConfig & AwsSdkSigV4APreviouslyResolved ): T & AwsSdkSigV4AAuthResolvedConfig => { - config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet ?? []); + config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet); return config as T & AwsSdkSigV4AAuthResolvedConfig; };