From 01f532274449a63d5c52cb0068353d6dd08de025 Mon Sep 17 00:00:00 2001 From: "Kamat, Trivikram" <16024985+trivikr@users.noreply.github.com> Date: Mon, 26 Feb 2024 07:33:54 -0800 Subject: [PATCH] test: aws-error/global-import --- .../__fixtures__/aws-error/global-import.input.ts | 8 ++++++++ .../__fixtures__/aws-error/global-import.output.ts | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts create mode 100644 src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts diff --git a/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts new file mode 100644 index 000000000..5bbe11018 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.input.ts @@ -0,0 +1,8 @@ +import AWS from "aws-sdk"; + +export const isAwsError = (error: unknown): error is AWS.AWSError => { + if (error === undefined) { + return false + } + return error instanceof Error; +} \ No newline at end of file diff --git a/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts new file mode 100644 index 000000000..2837beec3 --- /dev/null +++ b/src/transforms/v2-to-v3/__fixtures__/aws-error/global-import.output.ts @@ -0,0 +1,8 @@ +import { ServiceException } from "@smithy/smithy-client"; + +export const isAwsError = (error: unknown): error is ServiceException => { + if (error === undefined) { + return false + } + return error instanceof Error; +} \ No newline at end of file