From bf8b5b8735ca8cd97efcd0f646fb5c2352fc969f Mon Sep 17 00:00:00 2001 From: Leo Hanisch Date: Fri, 17 Jan 2025 16:42:39 +0100 Subject: [PATCH] chore: Try to add integration test --- .../test/integ-handlers/ts-paths-handler.ts | 5 +++++ .../aws-lambda-nodejs/test/integ.compilations.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ-handlers/ts-paths-handler.ts diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ-handlers/ts-paths-handler.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ-handlers/ts-paths-handler.ts new file mode 100644 index 0000000000000..17f8010631a91 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ-handlers/ts-paths-handler.ts @@ -0,0 +1,5 @@ +import { mult } from '@integ-handlers/util'; + +export async function handler(): Promise { + console.log(mult(3, 4)); // eslint-disable-line no-console +} diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.compilations.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.compilations.ts index 591fd33d2e8fe..4705e1b1d5384 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.compilations.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-lambda-nodejs/test/integ.compilations.ts @@ -30,6 +30,18 @@ class TestStack extends Stack { }, runtime: STANDARD_NODEJS_RUNTIME, }); + + new lambda.NodejsFunction(this, 'ts-paths-handler-tsconfig', { + entry: path.join(__dirname, 'integ-handlers/ts-paths-handler.ts'), + bundling: { + minify: true, + sourceMap: true, + sourceMapMode: lambda.SourceMapMode.BOTH, + tsconfig: path.join(__dirname, '..', 'tsconfig-custom.json'), + preCompilation: true, + }, + runtime: STANDARD_NODEJS_RUNTIME, + }); } }