Skip to content

Commit 65c0126

Browse files
committed
fix(userEvent): actually export userEvent
1 parent 1e926c3 commit 65c0126

File tree

14 files changed

+17
-16
lines changed

14 files changed

+17
-16
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {getQueriesForElement} from './get-queries-for-element'
22
import * as queries from './queries'
33
import * as queryHelpers from './query-helpers'
4+
import * as userEvent from './user-event'
45

56
export * from './queries'
67
export * from './wait-for'
@@ -26,4 +27,5 @@ export {
2627
// export query utils under a namespace for convenience:
2728
queries,
2829
queryHelpers,
30+
userEvent,
2931
}

src/user-event/__tests__/clear.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup} from './helpers/utils'
33

44
test('clears text', () => {

src/user-event/__tests__/click.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup, addEventListener, addListeners} from './helpers/utils'
33

44
test('click in input', () => {

src/user-event/__tests__/dblclick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup, addEventListener, addListeners} from './helpers/utils'
33

44
test('fires the correct events on buttons', () => {

src/user-event/__tests__/hover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup} from './helpers/utils'
33

44
test('hover', async () => {

src/user-event/__tests__/selectoptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setupSelect} from './helpers/utils'
33

44
test('fires correct events', () => {

src/user-event/__tests__/tab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup} from './helpers/utils'
33

44
test('should cycle elements in document tab order', () => {

src/user-event/__tests__/toggleselectoptions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {addListeners, setupSelect, setup} from './helpers/utils'
33

44
test('should fire the correct events for multiple select', () => {

src/user-event/__tests__/type-modifiers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup} from './helpers/utils'
33

44
// Note, use the setup function at the bottom of the file...

src/user-event/__tests__/type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup, addListeners} from './helpers/utils'
33
import './helpers/customElement'
44

src/user-event/__tests__/unhover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup} from './helpers/utils'
33

44
test('unhover', async () => {

src/user-event/__tests__/upload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import userEvent from '..'
1+
import * as userEvent from '..'
22
import {setup, addListeners} from './helpers/utils'
33

44
test('should fire the correct events for input', () => {

src/user-event/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {fireEvent} from '..'
1+
import {fireEvent} from '../events'
22
import {type} from './type'
33
import {tick} from './tick'
44

@@ -470,7 +470,7 @@ async function unhover(element, init) {
470470
fireEvent.mouseLeave(element, getMouseEventOptions('mouseleave', init))
471471
}
472472

473-
const userEvent = {
473+
export {
474474
click,
475475
dblClick,
476476
selectOptions,
@@ -483,8 +483,6 @@ const userEvent = {
483483
unhover,
484484
}
485485

486-
export default userEvent
487-
488486
/*
489487
eslint
490488
max-depth: ["error", 6],

src/user-event/type.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import {getConfig, fireEvent} from '..'
1+
import {fireEvent} from '../events'
2+
import {getConfig} from '../config'
23
import {tick} from './tick'
34

45
function wait(time) {

0 commit comments

Comments
 (0)