Skip to content

Commit

Permalink
test: Fix react 18 error.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 8, 2022
1 parent cea60dc commit cb415f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/react-hotkeys.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable jest/no-conditional-expect */
import React from 'react'
import ReactDOM from 'react-dom'
// import ReactDOM from 'react-dom'
import { createRoot } from 'react-dom/client';
import TestRenderer from 'react-test-renderer';
import Hotkeys from '../src';

Expand Down Expand Up @@ -117,8 +118,8 @@ describe('<Hotkeys /> Event 222.', () => {
return element
}
const elm = setup()

ReactDOM.render(
const root = createRoot(elm);
root.render(
<Hotkeys
keyName="shift+a"
onKeyDown={(shortcut, e, handle) => {
Expand All @@ -140,7 +141,6 @@ describe('<Hotkeys /> Event 222.', () => {
>
<div style={{ padding: "20px" }} />
</Hotkeys>
,elm
);
});

Expand Down

0 comments on commit cb415f8

Please # to comment.