Skip to content

Commit dba6024

Browse files
[test] Update e2e test app (#47252)
Signed-off-by: Albert Yu <albert@albertyu.co> Co-authored-by: Albert Yu <albert@albertyu.co>
1 parent c6bed46 commit dba6024

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

test/e2e/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as React from 'react';
2-
import * as ReactDOM from 'react-dom';
32
import * as ReactDOMClient from 'react-dom/client';
43
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router';
54
import * as DomTestingLibrary from '@testing-library/dom';
@@ -104,13 +103,8 @@ function App() {
104103

105104
const container = document.getElementById('react-root');
106105
const children = <App />;
107-
if (typeof ReactDOM.unstable_createRoot === 'function') {
108-
const root = ReactDOM.unstable_createRoot(container);
109-
root.render(children);
110-
} else {
111-
const root = ReactDOMClient.createRoot(container);
112-
root.render(children);
113-
}
106+
const root = ReactDOMClient.createRoot(container);
107+
root.render(children);
114108

115109
window.DomTestingLibrary = DomTestingLibrary;
116110
window.elementToString = function elementToString(element) {

0 commit comments

Comments
 (0)