Skip to content

Commit

Permalink
Fix tests on latest Node.js
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jun 24, 2024
1 parent 4ce4687 commit 15440dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/util/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import { act } from 'react-dom/test-utils';
import env from 'min-react-env';
import createVimeo from './createVimeo';

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

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

Expand Down

0 comments on commit 15440dc

Please sign in to comment.