Skip to content

Commit da9755a

Browse files
authored
test(lambda): Remove duplicate code in Lambda tests (#7672)
## Problem Duplicate code linter was finding errors in the `utils` tests for Lambda ## Solution Remove duplicate code (now relying on already existing `mockLambda`) --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 8cd876d commit da9755a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

packages/core/src/test/lambda/utils.test.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {
1313
setFunctionInfo,
1414
compareCodeSha,
1515
} from '../../lambda/utils'
16-
import { LambdaFunction } from '../../lambda/commands/uploadLambda'
1716
import { DefaultLambdaClient } from '../../shared/clients/lambdaClient'
1817
import { fs } from '../../shared/fs/fs'
1918
import { tempDirPath } from '../../shared/filesystemUtilities'
@@ -117,16 +116,6 @@ describe('lambda utils', function () {
117116
})
118117

119118
describe('setFunctionInfo', function () {
120-
let mockLambda: LambdaFunction
121-
122-
beforeEach(function () {
123-
mockLambda = {
124-
name: 'test-function',
125-
region: 'us-east-1',
126-
configuration: { FunctionName: 'test-function' },
127-
}
128-
})
129-
130119
afterEach(function () {
131120
sinon.restore()
132121
})
@@ -151,16 +140,6 @@ describe('lambda utils', function () {
151140
})
152141

153142
describe('compareCodeSha', function () {
154-
let mockLambda: LambdaFunction
155-
156-
beforeEach(function () {
157-
mockLambda = {
158-
name: 'test-function',
159-
region: 'us-east-1',
160-
configuration: { FunctionName: 'test-function' },
161-
}
162-
})
163-
164143
afterEach(function () {
165144
sinon.restore()
166145
})

0 commit comments

Comments
 (0)