@@ -40,12 +40,12 @@ describe('Validations Tests', () => {
40
40
test ( 'should handle empty memory size input' , ( ) => {
41
41
jest . clearAllMocks ( ) ;
42
42
core . getInput . mockImplementation ( ( name ) => {
43
- if ( name === 'memory-size' ) return '' ;
44
- if ( name === 'function-name' ) return 'test-function' ;
45
- if ( name === 'region' ) return 'us-east-1' ;
46
- if ( name === 'code-artifacts-dir' ) return './artifacts' ;
47
- if ( name === 'handler' ) return 'index.handler' ;
48
- if ( name === 'runtime' ) return 'nodejs18.x' ;
43
+ if ( name === 'memory-size' ) return '' ;
44
+ if ( name === 'function-name' ) return 'test-function' ;
45
+ if ( name === 'region' ) return 'us-east-1' ;
46
+ if ( name === 'code-artifacts-dir' ) return './artifacts' ;
47
+ if ( name === 'handler' ) return 'index.handler' ;
48
+ if ( name === 'runtime' ) return 'nodejs18.x' ;
49
49
return '' ;
50
50
} ) ;
51
51
const result = originalValidations . validateAllInputs ( ) ;
@@ -56,12 +56,12 @@ describe('Validations Tests', () => {
56
56
test ( 'should handle non-numeric memory size input' , ( ) => {
57
57
jest . clearAllMocks ( ) ;
58
58
core . getInput . mockImplementation ( ( name ) => {
59
- if ( name === 'memory-size' ) return 'hello' ;
60
- if ( name === 'function-name' ) return 'test-function' ;
61
- if ( name === 'region' ) return 'us-east-1' ;
62
- if ( name === 'code-artifacts-dir' ) return './artifacts' ;
63
- if ( name === 'handler' ) return 'index.handler' ;
64
- if ( name === 'runtime' ) return 'nodejs18.x' ;
59
+ if ( name === 'memory-size' ) return 'hello' ;
60
+ if ( name === 'function-name' ) return 'test-function' ;
61
+ if ( name === 'region' ) return 'us-east-1' ;
62
+ if ( name === 'code-artifacts-dir' ) return './artifacts' ;
63
+ if ( name === 'handler' ) return 'index.handler' ;
64
+ if ( name === 'runtime' ) return 'nodejs18.x' ;
65
65
return '' ;
66
66
} ) ;
67
67
const result = originalValidations . validateAllInputs ( ) ;
@@ -93,13 +93,13 @@ describe('Validations Tests', () => {
93
93
test ( 'should handle non-numeric memory size input' , ( ) => {
94
94
jest . clearAllMocks ( ) ;
95
95
core . getInput . mockImplementation ( ( name ) => {
96
- if ( name === 'timeout' ) return 'hello' ;
97
- if ( name === 'function-name' ) return 'test-function' ;
98
- if ( name === 'region' ) return 'us-east-1' ;
99
- if ( name === 'code-artifacts-dir' ) return './artifacts' ;
100
- if ( name === 'handler' ) return 'index.handler' ;
101
- if ( name === 'runtime' ) return 'nodejs18.x' ;
102
- return '' ;
96
+ if ( name === 'timeout' ) return 'hello' ;
97
+ if ( name === 'function-name' ) return 'test-function' ;
98
+ if ( name === 'region' ) return 'us-east-1' ;
99
+ if ( name === 'code-artifacts-dir' ) return './artifacts' ;
100
+ if ( name === 'handler' ) return 'index.handler' ;
101
+ if ( name === 'runtime' ) return 'nodejs18.x' ;
102
+ return '' ;
103
103
} ) ;
104
104
const result = originalValidations . validateAllInputs ( ) ;
105
105
expect ( result . valid ) . toBe ( false ) ;
@@ -130,13 +130,13 @@ describe('Validations Tests', () => {
130
130
test ( 'should handle non-numeric memory size input' , ( ) => {
131
131
jest . clearAllMocks ( ) ;
132
132
core . getInput . mockImplementation ( ( name ) => {
133
- if ( name === 'ephemeral-storage' ) return 'hello' ;
134
- if ( name === 'function-name' ) return 'test-function' ;
135
- if ( name === 'region' ) return 'us-east-1' ;
136
- if ( name === 'code-artifacts-dir' ) return './artifacts' ;
137
- if ( name === 'handler' ) return 'index.handler' ;
138
- if ( name === 'runtime' ) return 'nodejs18.x' ;
139
- return '' ;
133
+ if ( name === 'ephemeral-storage' ) return 'hello' ;
134
+ if ( name === 'function-name' ) return 'test-function' ;
135
+ if ( name === 'region' ) return 'us-east-1' ;
136
+ if ( name === 'code-artifacts-dir' ) return './artifacts' ;
137
+ if ( name === 'handler' ) return 'index.handler' ;
138
+ if ( name === 'runtime' ) return 'nodejs18.x' ;
139
+ return '' ;
140
140
} ) ;
141
141
const result = originalValidations . validateAllInputs ( ) ;
142
142
expect ( result . valid ) . toBe ( false ) ;
@@ -353,7 +353,7 @@ describe('Validations Tests', () => {
353
353
test ( 'should reject invalid source KMS key ARN format' , ( ) => {
354
354
core . getInput . mockImplementation ( ( name ) => {
355
355
if ( name === 'kms-key-arn' ) return 'invalid:kms:key:arn' ;
356
- if ( name === 'source-kms-key-arn' ) return 'invalid:kms:key:arn'
356
+ if ( name === 'source-kms-key-arn' ) return 'invalid:kms:key:arn' ;
357
357
if ( name === 'function-name' ) return 'test-function' ;
358
358
if ( name === 'region' ) return 'us-east-1' ;
359
359
if ( name === 'code-artifacts-dir' ) return './artifacts' ;
@@ -402,7 +402,7 @@ describe('Validations Tests', () => {
402
402
test ( 'should accept valid environment variables' , ( ) => {
403
403
const mockGetInput = jest . fn ( ( name ) => {
404
404
if ( name === 'environment' ) {
405
- return '{"ENV":"prod","DEBUG":"true","API_URL":"https://api.example.com"}'
405
+ return '{"ENV":"prod","DEBUG":"true","API_URL":"https://api.example.com"}' ;
406
406
}
407
407
const inputs = {
408
408
'function-name' : 'test-function' ,
@@ -889,7 +889,7 @@ describe('Validations Tests', () => {
889
889
describe ( 'VPC Configuration Edge Cases' , ( ) => {
890
890
test ( 'should reject vpc-config with malformed SubnetIds' , ( ) => {
891
891
const invalidVpcConfig = JSON . stringify ( {
892
- SubnetIds : " subnet-123" ,
892
+ SubnetIds : ' subnet-123' ,
893
893
SecurityGroupIds : [ 'sg-123' ]
894
894
} ) ;
895
895
core . getInput . mockImplementation ( ( name ) => {
@@ -906,7 +906,7 @@ describe('Validations Tests', () => {
906
906
const result = originalValidations . validateAllInputs ( ) ;
907
907
expect ( result . valid ) . toBe ( false ) ;
908
908
expect ( core . setFailed ) . toHaveBeenCalledWith (
909
- expect . stringContaining ( " vpc-config must include 'SubnetIds' as an array" )
909
+ expect . stringContaining ( ' vpc-config must include \ 'SubnetIds\ ' as an array' )
910
910
) ;
911
911
} ) ;
912
912
test ( 'should reject vpc-config with empty SecurityGroupIds array' , ( ) => {
@@ -1010,7 +1010,7 @@ describe('Validations Tests', () => {
1010
1010
const result = originalValidations . validateAllInputs ( ) ;
1011
1011
expect ( result . valid ) . toBe ( false ) ;
1012
1012
expect ( core . setFailed ) . toHaveBeenCalledWith (
1013
- expect . stringContaining ( " tracing-config Mode must be 'Active' or 'PassThrough'" )
1013
+ expect . stringContaining ( ' tracing-config Mode must be \ 'Active\ ' or \ 'PassThrough\'' )
1014
1014
) ;
1015
1015
} ) ;
1016
1016
} ) ;
@@ -1057,7 +1057,7 @@ describe('Validations Tests', () => {
1057
1057
const result = originalValidations . validateAllInputs ( ) ;
1058
1058
expect ( result . valid ) . toBe ( false ) ;
1059
1059
expect ( core . setFailed ) . toHaveBeenCalledWith (
1060
- expect . stringContaining ( " snap-start ApplyOn must be 'PublishedVersions' or 'None'" )
1060
+ expect . stringContaining ( ' snap-start ApplyOn must be \ 'PublishedVersions\ ' or \ 'None\'' )
1061
1061
) ;
1062
1062
} ) ;
1063
1063
} ) ;
@@ -1077,7 +1077,7 @@ describe('Validations Tests', () => {
1077
1077
const result = originalValidations . validateAllInputs ( ) ;
1078
1078
expect ( result . valid ) . toBe ( false ) ;
1079
1079
expect ( core . setFailed ) . toHaveBeenCalledWith (
1080
- expect . stringContaining ( " file-system-configs must be an array" )
1080
+ expect . stringContaining ( ' file-system-configs must be an array' )
1081
1081
) ;
1082
1082
} ) ;
1083
1083
test ( 'should reject file-system-configs with missing Arn' , ( ) => {
@@ -1096,7 +1096,7 @@ describe('Validations Tests', () => {
1096
1096
const result = originalValidations . validateAllInputs ( ) ;
1097
1097
expect ( result . valid ) . toBe ( false ) ;
1098
1098
expect ( core . setFailed ) . toHaveBeenCalledWith (
1099
- expect . stringContaining ( " Each file-system-config must include 'Arn' and 'LocalMountPath'" )
1099
+ expect . stringContaining ( ' Each file-system-config must include \ 'Arn\ ' and \ 'LocalMountPath\'' )
1100
1100
) ;
1101
1101
} ) ;
1102
1102
test ( 'should validate multiple file system configs' , ( ) => {
@@ -1154,7 +1154,7 @@ describe('Validations Tests', () => {
1154
1154
const result = originalValidations . validateAllInputs ( ) ;
1155
1155
expect ( result . valid ) . toBe ( false ) ;
1156
1156
expect ( core . setFailed ) . toHaveBeenCalledWith (
1157
- expect . stringContaining ( " tags must be an object of key-value pairs" )
1157
+ expect . stringContaining ( ' tags must be an object of key-value pairs' )
1158
1158
) ;
1159
1159
} ) ;
1160
1160
} ) ;
0 commit comments