Skip to content

Commit

Permalink
docs: added testing tip
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Nov 4, 2021
1 parent 538d7fa commit 91155f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/content/guide/testing.md
Expand Up @@ -60,10 +60,10 @@ test('it validates', async () => {
input.value = '';
input.dispatchEvent(new Event('change'));

// ✅ Now passes
await waitForExpect(async () => {
// wait for the promises to fulfill
await flushPromises();
// wait for the promises to fulfill
await flushPromises();
await waitForExpect(() => {
// ✅ Now passes
expect(document.querySelector('span').textContent).toBe('Field is required');
});
});
Expand Down

0 comments on commit 91155f1

Please sign in to comment.