Skip to content

Commit

Permalink
test: update context stub
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle committed Feb 12, 2021
1 parent d2fa945 commit 2fe77d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/amplify-util-mock/src/__tests__/func/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ describe('function start', () => {
success: jest.fn(),
info: jest.fn(),
error: jest.fn(),
blue: jest.fn(),
},
};

jest.setTimeout(1000 * 20);

// NOTE: A warning from jest saying that async operations weren't stopped in the test is expected here
// because the mock function is designed to keep running after the timeout to ense that the timeout works
// because the mock function is designed to keep running after the timeout to ensure that the timeout works
it('times out function execution at the default time', async () => {
await start(context_stub);
expect(context_stub.print.error.mock.calls[0][0]).toMatchInlineSnapshot(`"funcName failed with the following error:"`);
Expand Down

0 comments on commit 2fe77d5

Please sign in to comment.