diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index 16753712b500..07bb4be5017b 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -395,6 +395,8 @@ test('resolves to lemon', () => { }); ``` +Note that, since you are still testing promises, the test is still asynchronous. Hence, you will need to [tell Jest to wait](TestingAsyncCode.md#promises) by returning the unwrapped assertion. + Alternatively, you can use `async/await` in combination with `.resolves`: ```js @@ -422,6 +424,8 @@ test('rejects to octopus', () => { }); ``` +Note that, since you are still testing promises, the test is still asynchronous. Hence, you will need to [tell Jest to wait](TestingAsyncCode.md#promises) by returning the unwrapped assertion. + Alternatively, you can use `async/await` in combination with `.rejects`. ```js