-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Labels
bugSomething isn't workingSomething isn't workingenvironment:jsdomIssue with JSDOM environmentIssue with JSDOM environment
Description
@testing-library/user-eventversion: 12.0.11- Testing Framework and version: [email protected]
- DOM Environment: [email protected] (via
jest-environment-jsdom-fourteen)
I'm having some issues with the following test-snippet (copied from the readme with some minor modification):
test('type', () => {
render(<textarea />);
userEvent.type(screen.getByRole('textbox'), 'hey');
expect(screen.getByRole('textbox')).toHaveValue('hey');
});When I run this, it fails with the following output:
Whatever text i input, it chucks the first input-character at the end, (i.e. 123 -> 231).
I'm guessing this is not the expected outcome - or if so, what am I missing? π
I'm using fireEvent.change(screen.getByRole('textbox'), { target: { value: 'hey' } }) as a workaround for now.
dainyl, bigfoot31, rwalle61, vkatushenok, Byronium and 7 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenvironment:jsdomIssue with JSDOM environmentIssue with JSDOM environment
