-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We avoid a major version bump by continuing to export `waitForExpect` as well.
- Loading branch information
Kent C. Dodds
committed
Mar 29, 2018
1 parent
4adbc1d
commit 69a395f
Showing
6 changed files
with
97 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import {flushPromises, waitForExpect} from '../' | ||
|
||
test('flushPromises (DEPRECATED) still works', async () => { | ||
const fn = jest.fn() | ||
Promise.resolve().then(fn) | ||
await flushPromises() | ||
expect(fn).toHaveBeenCalledTimes(1) | ||
}) | ||
|
||
test('waitForExpect (DEPRECATED) still works', async () => { | ||
const fn = jest.fn() | ||
Promise.resolve().then(fn) | ||
await waitForExpect(() => expect(fn).toHaveBeenCalledTimes(1)) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters