@@ -24,6 +24,9 @@ const {
2424 DeleteEventSourceMappingCommand,
2525 GetFunctionCommand,
2626 ListEventSourceMappingsCommand,
27+ ListTagsCommand,
28+ TagResourceCommand,
29+ UntagResourceCommand,
2730 UpdateEventSourceMappingCommand,
2831 UpdateFunctionCodeCommand,
2932 UpdateFunctionConfigurationCommand
@@ -162,10 +165,8 @@ describe('lib/main', function () {
162165 }
163166
164167 let aws = null // mock
165- let awsLambda = null // mock
166168 before ( ( ) => {
167169 aws = _mockSetting ( )
168- awsLambda = new aws . Lambda ( { apiVersion : '2015-03-31' } )
169170
170171 if ( process . platform === 'win32' ) {
171172 execFileSync ( 'cmd.exe' , [ '/c' , 'npm' , 'ci' ] , { cwd : sourceDirectoryForTest } )
@@ -180,6 +181,9 @@ describe('lib/main', function () {
180181 mockLambdaClient . on ( DeleteEventSourceMappingCommand ) . resolves ( lambdaMockSettings . deleteEventSourceMapping )
181182 mockLambdaClient . on ( GetFunctionCommand ) . resolves ( lambdaMockSettings . getFunction )
182183 mockLambdaClient . on ( ListEventSourceMappingsCommand ) . resolves ( lambdaMockSettings . listEventSourceMappings )
184+ mockLambdaClient . on ( ListTagsCommand ) . resolves ( lambdaMockSettings . listTags )
185+ mockLambdaClient . on ( TagResourceCommand ) . resolves ( lambdaMockSettings . tagResource )
186+ mockLambdaClient . on ( UntagResourceCommand ) . resolves ( lambdaMockSettings . untagResource )
183187 mockLambdaClient . on ( UpdateEventSourceMappingCommand ) . resolves ( lambdaMockSettings . updateEventSourceMapping )
184188 mockLambdaClient . on ( UpdateFunctionCodeCommand ) . resolves ( lambdaMockSettings . updateFunctionCode )
185189 mockLambdaClient . on ( UpdateFunctionConfigurationCommand ) . resolves ( lambdaMockSettings . updateFunctionConfiguration )
@@ -1682,7 +1686,7 @@ describe('lib/main', function () {
16821686 describe ( 'Lambda.prototype._updateTags()' , ( ) => {
16831687 it ( 'simple test with mock' , ( ) => {
16841688 return lambda . _updateTags (
1685- awsLambda ,
1689+ lambdaClient ,
16861690 'arn:aws:lambda:eu-central-1:1234567:function:test' ,
16871691 { tagKey : 'tagValue' } ) . then ( ( result ) => {
16881692 assert . deepEqual (
0 commit comments