Skip to content

Commit f15358d

Browse files
authored
feat(devtools): add user-event to window object (#251)
1 parent ca70003 commit f15358d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

devtools/src/window/testing-library.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {
44
getSuggestedQuery,
55
fireEvent,
66
} from '@testing-library/dom';
7+
import userEvent from '@testing-library/user-event';
8+
79
window.__TESTING_PLAYGROUND__ = window.__TESTING_PLAYGROUND__ || {};
810

911
function augmentQuery(query) {
@@ -32,6 +34,8 @@ export function setup(view) {
3234
view.within = within;
3335

3436
view.container = view.document.body;
37+
view.userEvent = userEvent;
38+
view.user = userEvent;
3539
}
3640

3741
setup(window);

0 commit comments

Comments
 (0)