Skip to content

Commit

Permalink
test: add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Richter committed Jan 17, 2025
1 parent cabeb4f commit be5852d
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { mult } from '../util';

export async function handler(): Promise<void> {
console.log(mult(3, 4)); // eslint-disable-line no-console
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ class TestStack extends Stack {
},
});

new lambda.NodejsFunction(this, 'js-handler-tsconfig-path', {
entry: path.join(__dirname, 'integ-handlers/js-handler.js'),
bundling: {
tsconfig: path.join(__dirname, 'whitespace path/tsconfig.ts'),
},
});

new lambda.NodejsFunction(this, 'ts-handler-metafile-path', {
entry: path.join(__dirname, 'integ-handlers/whitespace path/ts-handler.ts'),
bundling: {
metafile: true,
},
});

new lambda.NodejsFunction(this, 'ts-handler-vpc', {
entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'),
runtime: STANDARD_NODEJS_RUNTIME,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"compilerOptions": {
"declarationMap": false,
"inlineSourceMap": true,
"inlineSources": true,
"alwaysStrict": true,
"declaration": true,
"experimentalDecorators": true,
"incremental": true,
"lib": [
"es2020",
"dom"
],
"module": "CommonJS",
"newLine": "lf",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"stripInternal": false,
"target": "ES2020",
"composite": true,
"tsBuildInfoFile": "tsconfig.tsbuildinfo"
},
"include": [
"**/*.ts"
],
"exclude": [
"node_modules"
],
"references": [
{
"path": "../aws-lambda"
},
{
"path": "../core"
},
{
"path": "../assertions"
},
{
"path": "../aws-ec2"
},
{
"path": "../../../tools/@aws-cdk/cdk-build-tools"
},
{
"path": "../integ-runner"
},
{
"path": "../integ-tests"
},
{
"path": "../../../tools/@aws-cdk/pkglint"
},
{
"path": "../triggers"
}
],
"_generated_by_jsii_": "Generated by jsii - safe to delete, and ideally should be in .gitignore"
}

0 comments on commit be5852d

Please sign in to comment.