@@ -7,7 +7,6 @@ import {Template, Match} from "aws-cdk-lib/assertions"
77import { describe , test , beforeAll } from "@jest/globals"
88
99import { LambdaFunction } from "../resources/LambdaFunction"
10- import { Runtime } from "aws-cdk-lib/aws-lambda"
1110
1211describe ( "functionConstruct works correctly" , ( ) => {
1312 let stack : Stack
@@ -28,7 +27,6 @@ describe("functionConstruct works correctly", () => {
2827 serviceName : "testServiceName" ,
2928 stackName : "testServiceName-testStack" ,
3029 lambdaName : "testLambda" ,
31- runtime : Runtime . NODEJS_20_X ,
3230 additionalPolicies : [
3331 ] ,
3432 packageBasePath : "packages/cdk" ,
@@ -111,7 +109,7 @@ describe("functionConstruct works correctly", () => {
111109 test ( "it has the correct lambda" , ( ) => {
112110 template . hasResourceProperties ( "AWS::Lambda::Function" , {
113111 Handler : "index.handler" ,
114- Runtime : "nodejs20 .x" ,
112+ Runtime : "nodejs22 .x" ,
115113 FunctionName : "testServiceName-testLambda" ,
116114 MemorySize : 256 ,
117115 Architectures : [ "x86_64" ] ,
@@ -150,7 +148,6 @@ describe("functionConstruct works correctly with environment variables", () => {
150148 serviceName : "testServiceName" ,
151149 stackName : "testServiceName-testStack" ,
152150 lambdaName : "testLambda" ,
153- runtime : Runtime . NODEJS_20_X ,
154151 additionalPolicies : [ ] ,
155152 packageBasePath : "packages/cdk" ,
156153 entryPoint : "tests/src/dummyLambda.ts" ,
@@ -163,7 +160,7 @@ describe("functionConstruct works correctly with environment variables", () => {
163160
164161 test ( "environment variables are added correctly" , ( ) => {
165162 template . hasResourceProperties ( "AWS::Lambda::Function" , {
166- Runtime : "nodejs20 .x" ,
163+ Runtime : "nodejs22 .x" ,
167164 FunctionName : "testServiceName-testLambda" ,
168165 Environment : { Variables : { foo : "bar" } }
169166 } )
@@ -193,7 +190,6 @@ describe("functionConstruct works correctly with additional policies", () => {
193190 serviceName : "testServiceName" ,
194191 stackName : "testServiceName-testStack" ,
195192 lambdaName : "testLambda" ,
196- runtime : Runtime . NODEJS_20_X ,
197193 additionalPolicies : [ testPolicy ] ,
198194 packageBasePath : "packages/cdk" ,
199195 entryPoint : "tests/src/dummyLambda.ts" ,
0 commit comments