Skip to content

Commit

Permalink
fix: updated the documentation for the type method
Browse files Browse the repository at this point in the history
Fixes #198
  • Loading branch information
Mahesh Jagadeesan committed Dec 18, 2019
1 parent e3b9fbc commit 3cfbcbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -109,7 +109,7 @@ test("double click", () => {
});
```

### `type(element, text, [options])`
### `async type(element, text, [options])`

Writes `text` inside an `<input>` or a `<textarea>`.

Expand All @@ -122,7 +122,7 @@ const { getByTestId } = test("click", () => {
render(<textarea data-testid="email" />);
});

userEvent.type(getByTestId("email"), "Hello, World!");
await userEvent.type(getByTestId("email"), "Hello, World!");
expect(getByTestId("email")).toHaveAttribute("value", "Hello, World!");
```

Expand Down

0 comments on commit 3cfbcbe

Please sign in to comment.