Skip to content

Commit

Permalink
latest min-react-env
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jun 29, 2024
1 parent 6bf1364 commit 91ceae0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"eslint-plugin-react-hooks": "^4.3.0",
"expect": "^1.20.2",
"md-insert": "^1.0.1",
"min-react-env": "^1.0.1",
"min-react-env": "^2.0.0",
"mocha": "^10.0.0",
"prop-types-table": "^1.0.0",
"proxyquire": "^2.1.3",
Expand Down
9 changes: 3 additions & 6 deletions test/util/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
* https://github.com/troybetz/react-youtube
*/

/* global document */
import React from 'react';
import ReactDOM from 'react-dom';
import { act } from 'react-dom/test-utils';
import env from 'min-react-env';
import 'min-react-env/install';
import createVimeo from './createVimeo';

Object.assign(global, env, {
navigator: { userAgent: 'min-react-env' },
});

const reactMajor = parseInt((ReactDOM.version || '16').split('.')[0], 10);

function noAct(fn) {
Expand Down Expand Up @@ -45,7 +42,7 @@ async function render(initialProps) {
}
}

const div = env.document.createElement('div');
const div = document.createElement('div');
let root;
if (reactMajor >= 18) {
const { createRoot } = await import('react-dom/client');
Expand Down

0 comments on commit 91ceae0

Please sign in to comment.