@@ -40,12 +40,12 @@ describe('Validations Tests', () => {
4040 test ( 'should handle empty memory size input' , ( ) => {
4141 jest . clearAllMocks ( ) ;
4242 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' ;
4949 return '' ;
5050 } ) ;
5151 const result = originalValidations . validateAllInputs ( ) ;
@@ -56,12 +56,12 @@ describe('Validations Tests', () => {
5656 test ( 'should handle non-numeric memory size input' , ( ) => {
5757 jest . clearAllMocks ( ) ;
5858 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' ;
6565 return '' ;
6666 } ) ;
6767 const result = originalValidations . validateAllInputs ( ) ;
@@ -93,13 +93,13 @@ describe('Validations Tests', () => {
9393 test ( 'should handle non-numeric memory size input' , ( ) => {
9494 jest . clearAllMocks ( ) ;
9595 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 '' ;
103103 } ) ;
104104 const result = originalValidations . validateAllInputs ( ) ;
105105 expect ( result . valid ) . toBe ( false ) ;
@@ -130,13 +130,13 @@ describe('Validations Tests', () => {
130130 test ( 'should handle non-numeric memory size input' , ( ) => {
131131 jest . clearAllMocks ( ) ;
132132 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 '' ;
140140 } ) ;
141141 const result = originalValidations . validateAllInputs ( ) ;
142142 expect ( result . valid ) . toBe ( false ) ;
@@ -353,7 +353,7 @@ describe('Validations Tests', () => {
353353 test ( 'should reject invalid source KMS key ARN format' , ( ) => {
354354 core . getInput . mockImplementation ( ( name ) => {
355355 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' ;
357357 if ( name === 'function-name' ) return 'test-function' ;
358358 if ( name === 'region' ) return 'us-east-1' ;
359359 if ( name === 'code-artifacts-dir' ) return './artifacts' ;
@@ -402,7 +402,7 @@ describe('Validations Tests', () => {
402402 test ( 'should accept valid environment variables' , ( ) => {
403403 const mockGetInput = jest . fn ( ( name ) => {
404404 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"}' ;
406406 }
407407 const inputs = {
408408 'function-name' : 'test-function' ,
@@ -889,7 +889,7 @@ describe('Validations Tests', () => {
889889 describe ( 'VPC Configuration Edge Cases' , ( ) => {
890890 test ( 'should reject vpc-config with malformed SubnetIds' , ( ) => {
891891 const invalidVpcConfig = JSON . stringify ( {
892- SubnetIds : " subnet-123" ,
892+ SubnetIds : ' subnet-123' ,
893893 SecurityGroupIds : [ 'sg-123' ]
894894 } ) ;
895895 core . getInput . mockImplementation ( ( name ) => {
@@ -906,7 +906,7 @@ describe('Validations Tests', () => {
906906 const result = originalValidations . validateAllInputs ( ) ;
907907 expect ( result . valid ) . toBe ( false ) ;
908908 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' )
910910 ) ;
911911 } ) ;
912912 test ( 'should reject vpc-config with empty SecurityGroupIds array' , ( ) => {
@@ -1010,7 +1010,7 @@ describe('Validations Tests', () => {
10101010 const result = originalValidations . validateAllInputs ( ) ;
10111011 expect ( result . valid ) . toBe ( false ) ;
10121012 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\'' )
10141014 ) ;
10151015 } ) ;
10161016 } ) ;
@@ -1057,7 +1057,7 @@ describe('Validations Tests', () => {
10571057 const result = originalValidations . validateAllInputs ( ) ;
10581058 expect ( result . valid ) . toBe ( false ) ;
10591059 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\'' )
10611061 ) ;
10621062 } ) ;
10631063 } ) ;
@@ -1077,7 +1077,7 @@ describe('Validations Tests', () => {
10771077 const result = originalValidations . validateAllInputs ( ) ;
10781078 expect ( result . valid ) . toBe ( false ) ;
10791079 expect ( core . setFailed ) . toHaveBeenCalledWith (
1080- expect . stringContaining ( " file-system-configs must be an array" )
1080+ expect . stringContaining ( ' file-system-configs must be an array' )
10811081 ) ;
10821082 } ) ;
10831083 test ( 'should reject file-system-configs with missing Arn' , ( ) => {
@@ -1096,7 +1096,7 @@ describe('Validations Tests', () => {
10961096 const result = originalValidations . validateAllInputs ( ) ;
10971097 expect ( result . valid ) . toBe ( false ) ;
10981098 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\'' )
11001100 ) ;
11011101 } ) ;
11021102 test ( 'should validate multiple file system configs' , ( ) => {
@@ -1154,7 +1154,7 @@ describe('Validations Tests', () => {
11541154 const result = originalValidations . validateAllInputs ( ) ;
11551155 expect ( result . valid ) . toBe ( false ) ;
11561156 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' )
11581158 ) ;
11591159 } ) ;
11601160 } ) ;
0 commit comments