diff --git a/e2e/__tests__/to_throw_error_matching_snapshot.test.js b/e2e/__tests__/to_throw_error_matching_snapshot.test.js index 75b2d3dd5740..69e5a6dca79a 100644 --- a/e2e/__tests__/to_throw_error_matching_snapshot.test.js +++ b/e2e/__tests__/to_throw_error_matching_snapshot.test.js @@ -84,8 +84,8 @@ test('cannot be used with .not', () => { test('should support rejecting promises', () => { const filename = 'should-support-rejecting-promises.test.js'; - const template = makeTemplate(`test('should support rejecting promises', async () => { - await expect(Promise.reject(new Error('octopus'))).rejects.toThrowErrorMatchingSnapshot(); + const template = makeTemplate(`test('should support rejecting promises', () => { + return expect(Promise.reject(new Error('octopus'))).rejects.toThrowErrorMatchingSnapshot(); }); `);