Skip to content

Commit

Permalink
oldest react
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Jun 12, 2024
1 parent c3a0a4a commit 6bf1364
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/util/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Object.assign(global, env, {

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

function noAct(fn) {
return fn();
}

async function render(initialProps) {
const { Vimeo, sdkMock, playerMock } = createVimeo({
shouldFail: initialProps.shouldFail,
Expand Down Expand Up @@ -63,7 +67,7 @@ async function render(initialProps) {
});

function rerender(newProps) {
return act(async () => {
return (act || noAct)(async () => {
container.setState({ props: newProps });
});
}
Expand Down

0 comments on commit 6bf1364

Please sign in to comment.