Skip to content

Commit

Permalink
chore: mock fs events fix
Browse files Browse the repository at this point in the history
  • Loading branch information
awsluja committed Jul 21, 2023
1 parent 39adc04 commit 06e15aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/amplify-cli/src/__tests__/execution-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 06e15aa

Please sign in to comment.