@@ -152,36 +152,36 @@ describe('lib/main', function () {
152152 const functionNamePattern =
153153 / ( a r n : a w s : l a m b d a : ) ? ( [ a - z ] { 2 } - [ a - z ] + - \d { 1 } : ) ? ( \d { 12 } : ) ? ( f u n c t i o n : ) ? ( [ a - z A - Z 0 - 9 - _ ] + ) ( : ( \$ L A T E S T | [ a - z A - Z 0 - 9 - _ ] + ) ) ? /
154154 it ( 'appends environment to original functionName' , function ( ) {
155- var params = lambda . _params ( program )
155+ const params = lambda . _params ( program )
156156 assert . equal ( params . FunctionName , '___node-lambda-development' )
157157 assert . match ( params . FunctionName , functionNamePattern )
158158 } )
159159
160160 it ( 'appends environment to original functionName (production)' , function ( ) {
161161 program . environment = 'production'
162- var params = lambda . _params ( program )
162+ const params = lambda . _params ( program )
163163 assert . equal ( params . FunctionName , '___node-lambda-production' )
164164 assert . match ( params . FunctionName , functionNamePattern )
165165 } )
166166
167167 it ( 'appends version to original functionName' , function ( ) {
168168 program . lambdaVersion = '2015-02-01'
169- var params = lambda . _params ( program )
169+ const params = lambda . _params ( program )
170170 assert . equal ( params . FunctionName , '___node-lambda-development-2015-02-01' )
171171 assert . match ( params . FunctionName , functionNamePattern )
172172 } )
173173
174174 it ( 'appends version to original functionName (value not allowed by AWS)' , function ( ) {
175175 program . lambdaVersion = '2015.02.01'
176- var params = lambda . _params ( program )
176+ const params = lambda . _params ( program )
177177 assert . equal ( params . FunctionName , '___node-lambda-development-2015_02_01' )
178178 assert . match ( params . FunctionName , functionNamePattern )
179179 } )
180180
181181 it ( 'appends VpcConfig to params when vpc params set' , function ( ) {
182182 program . vpcSubnets = 'subnet-00000000,subnet-00000001,subnet-00000002'
183183 program . vpcSecurityGroups = 'sg-00000000,sg-00000001,sg-00000002'
184- var params = lambda . _params ( program )
184+ const params = lambda . _params ( program )
185185 assert . equal ( params . VpcConfig . SubnetIds [ 0 ] , program . vpcSubnets . split ( ',' ) [ 0 ] )
186186 assert . equal ( params . VpcConfig . SubnetIds [ 1 ] , program . vpcSubnets . split ( ',' ) [ 1 ] )
187187 assert . equal ( params . VpcConfig . SubnetIds [ 2 ] , program . vpcSubnets . split ( ',' ) [ 2 ] )
@@ -191,7 +191,7 @@ describe('lib/main', function () {
191191 } )
192192
193193 it ( 'does not append VpcConfig when params are not set' , function ( ) {
194- var params = lambda . _params ( program )
194+ const params = lambda . _params ( program )
195195 assert . equal ( Object . keys ( params . VpcConfig . SubnetIds ) . length , 0 )
196196 assert . equal ( Object . keys ( params . VpcConfig . SecurityGroupIds ) . length , 0 )
197197 } )
@@ -206,7 +206,7 @@ describe('lib/main', function () {
206206
207207 it ( 'does not append DeadLetterConfig when params are not set' , function ( ) {
208208 delete program . deadLetterConfigTargetArn
209- var params = lambda . _params ( program )
209+ const params = lambda . _params ( program )
210210 assert . isNull ( params . DeadLetterConfig . TargetArn )
211211 } )
212212
@@ -236,19 +236,19 @@ describe('lib/main', function () {
236236
237237 it ( 'adds variables when configFile param is set' , function ( ) {
238238 program . configFile = 'tmp.env'
239- var params = lambda . _params ( program )
239+ const params = lambda . _params ( program )
240240 assert . equal ( params . Environment . Variables [ 'FOO' ] , 'bar' )
241241 assert . equal ( params . Environment . Variables [ 'BAZ' ] , 'bing' )
242242 } )
243243
244244 it ( 'when configFile param is set but it is an empty file' , function ( ) {
245245 program . configFile = 'empty.env'
246- var params = lambda . _params ( program )
246+ const params = lambda . _params ( program )
247247 assert . equal ( Object . keys ( params . Environment . Variables ) . length , 0 )
248248 } )
249249
250250 it ( 'does not add when configFile param is not set' , function ( ) {
251- var params = lambda . _params ( program )
251+ const params = lambda . _params ( program )
252252 assert . isNull ( params . Environment . Variables )
253253 } )
254254 } )
0 commit comments