Skip to content

Commit e3c8e77

Browse files
committed
Fix test config
1 parent 0eeaa97 commit e3c8e77

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/postDatedLambda/jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {JestConfigWithTsJest} from "ts-jest"
2-
import defaultConfig from "../../jest.default.config"
2+
import defaultConfig from "../../jest.default.config.ts"
33

44
const jestConfig: JestConfigWithTsJest = {
55
...defaultConfig,

packages/postDatedLambda/tests/main.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jest.unstable_mockModule(
1515
})
1616
)
1717

18-
const mockDrainAndProcess = jest.fn()
18+
const mockProcessPostDatedQueue = jest.fn()
1919
jest.unstable_mockModule(
2020
"../src/queueProcessing",
2121
async () => ({
2222
__esModule: true,
23-
drainAndProcess: mockDrainAndProcess
23+
processPostDatedQueue: mockProcessPostDatedQueue
2424
})
2525
)
2626

@@ -43,12 +43,12 @@ describe("Unit test for post-dated lambda handler", () => {
4343

4444
it("should run the lambda handler successfully", async () => {
4545
mockReportQueueStatus.mockImplementation(() => Promise.resolve())
46-
mockDrainAndProcess.mockImplementation(() => Promise.resolve())
46+
mockProcessPostDatedQueue.mockImplementation(() => Promise.resolve())
4747

4848
await expect(lambdaHandler(mockEventBridgeEvent)).resolves.toBeUndefined()
4949

5050
expect(mockReportQueueStatus).toHaveBeenCalledTimes(1)
51-
expect(mockDrainAndProcess).toHaveBeenCalledTimes(1)
51+
expect(mockProcessPostDatedQueue).toHaveBeenCalledTimes(1)
5252
})
5353

5454
})

0 commit comments

Comments
 (0)