Skip to content

Commit

Permalink
fix: lambda tests to use imported aws-sdk version
Browse files Browse the repository at this point in the history
  • Loading branch information
jagregory committed Jul 27, 2021
1 parent 5097439 commit d4a5c82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/lambda.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { MockLogger } from "../__tests__/mockLogger";
import { LambdaService } from "./lambda";
import * as AWS from "aws-sdk";
import { version } from "aws-sdk/package.json";

describe("Lambda function invoker", () => {
let mockLambdaClient: jest.Mocked<AWS.Lambda>;
Expand Down Expand Up @@ -137,7 +138,7 @@ describe("Lambda function invoker", () => {
Payload: JSON.stringify({
version: 0,
userName: "username",
callerContext: { awsSdkVersion: "2.656.0", clientId: "clientId" },
callerContext: { awsSdkVersion: version, clientId: "clientId" },
region: "local",
userPoolId: "userPoolId",
triggerSource: "UserMigration_Authentication",
Expand Down Expand Up @@ -192,7 +193,7 @@ describe("Lambda function invoker", () => {
Payload: JSON.stringify({
version: 0,
userName: "username",
callerContext: { awsSdkVersion: "2.656.0", clientId: "clientId" },
callerContext: { awsSdkVersion: version, clientId: "clientId" },
region: "local",
userPoolId: "userPoolId",
triggerSource: source,
Expand Down

0 comments on commit d4a5c82

Please sign in to comment.