From 18bf9cbd83bef567735e9cc1559dc77be0f7c7d0 Mon Sep 17 00:00:00 2001 From: awsluja Date: Fri, 21 Jul 2023 00:47:52 -0400 Subject: [PATCH] chore: mock fs events fix --- packages/amplify-cli/src/__tests__/execution-manager.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/amplify-cli/src/__tests__/execution-manager.test.ts b/packages/amplify-cli/src/__tests__/execution-manager.test.ts index d338ca9c4b6..6085b1611b0 100644 --- a/packages/amplify-cli/src/__tests__/execution-manager.test.ts +++ b/packages/amplify-cli/src/__tests__/execution-manager.test.ts @@ -74,6 +74,7 @@ describe('execution manager', () => { ['pull', { event: AmplifyEvent.PrePull, data: {} }], ['models', { event: AmplifyEvent.PreCodegenModels, data: {} }], ])('executeCommand raise pre %s event', async (command, args) => { + mockFs.readdirSync.mockReturnValue([]); mockFs.existsSync.mockReturnValue(true); mockContext.input.command = command; await executeCommand(mockContext); @@ -86,6 +87,7 @@ describe('execution manager', () => { ['pull', { event: AmplifyEvent.PostPull, data: {} }], ['models', { event: AmplifyEvent.PostCodegenModels, data: {} }], ])('executeCommand raise post %s event', async (command, args) => { + mockFs.readdirSync.mockReturnValue([]); mockFs.existsSync.mockReturnValue(true); mockContext.input.command = command; await executeCommand(mockContext);