Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit 56bf6ad

Browse files
authored
Merge pull request #43 from storybookjs/feat/upgrade-libraries
Upgrade user-event to v14 and testing-library to v9
2 parents 0cfd0d7 + 6cfe2cc commit 56bf6ad

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"access": "public"
2525
},
2626
"dependencies": {
27-
"@testing-library/dom": "^8.3.0",
28-
"@testing-library/user-event": "^13.2.1",
27+
"@testing-library/dom": "^9.3.1",
28+
"@testing-library/user-event": "^14.4.3",
2929
"ts-dedent": "^2.2.0"
3030
},
3131
"devDependencies": {

src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import _userEventObj from '@testing-library/user-event';
55
import dedent from 'ts-dedent';
66

77
// @ts-ignore (this is to ensure ESM compatibility)
8-
const _userEvent: typeof _userEventObj = (_userEventObj.default || _userEventObj);
8+
const _userEvent: typeof _userEventObj = _userEventObj.default || _userEventObj;
99

1010
const testingLibrary = instrument(
1111
{ ...domTestingLibrary },
@@ -104,4 +104,9 @@ export const {
104104
prettyFormat,
105105
} = testingLibrary;
106106

107-
export const { userEvent } = instrument({ userEvent: _userEvent }, { intercept: true });
107+
const userEvent: typeof _userEventObj = instrument(
108+
{ userEvent: _userEvent },
109+
{ intercept: true }
110+
).userEvent;
111+
112+
export { userEvent };

0 commit comments

Comments
 (0)