diff --git a/package.json b/package.json index f4cb43fc0d5a3b..1a71cdfd7efe30 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@babel/register": "^7.10.1", "@rollup/plugin-replace": "^2.3.1", "@testing-library/dom": "^7.22.1", - "@testing-library/react": "^10.0.1", + "@testing-library/react": "^11.0.2", "@testing-library/react-hooks": "3.4.1", "@types/chai": "^4.2.3", "@types/chai-dom": "^0.0.10", diff --git a/test/utils/createClientRender.js b/test/utils/createClientRender.js index bc0a06d1334ad8..38088c16da3df9 100644 --- a/test/utils/createClientRender.js +++ b/test/utils/createClientRender.js @@ -148,12 +148,7 @@ export function createClientRender(globalOptions = {}) { throw error; } - // act to flush effect cleanup functions - // state updates during this phase are safe - // TODO: Revisit once https://github.com/testing-library/react-testing-library/pull/768 is resolved. - await act(async () => { - await cleanup(); - }); + cleanup(); }); return function configuredClientRender(element, options = {}) { diff --git a/yarn.lock b/yarn.lock index aa404acdaf24be..ef4f78a9db5ba1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1063,7 +1063,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@7.0.0", "@babel/runtime@7.9.6", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@7.0.0", "@babel/runtime@7.9.6", "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.1.5", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.11.2", "@babel/runtime@^7.2.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.3", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.4.tgz#a6724f1a6b8d2f6ea5236dbfe58c7d7ea9c5eb99" integrity sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw== @@ -2445,7 +2445,7 @@ dependencies: defer-to-connect "^1.0.1" -"@testing-library/dom@^7.22.1", "@testing-library/dom@^7.22.3": +"@testing-library/dom@^7.22.1", "@testing-library/dom@^7.23.0": version "7.24.1" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.24.1.tgz#0e8acd042070f2c1b183fbfe5c0d38b3194ad3c0" integrity sha512-TemHWY59gvzcScGiE5eooZpzYk9GaED0TuuK4WefbIc/DQg0L5wOpnj7MIEeAGF3B7Ekf1kvmVnQ97vwz4Lmhg== @@ -2466,13 +2466,13 @@ "@babel/runtime" "^7.5.4" "@types/testing-library__react-hooks" "^3.3.0" -"@testing-library/react@^10.0.1": - version "10.4.9" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.4.9.tgz#9faa29c6a1a217bf8bbb96a28bd29d7a847ca150" - integrity sha512-pHZKkqUy0tmiD81afs8xfiuseXfU/N7rAX3iKjeZYje86t9VaB0LrxYVa+OOsvkrveX5jCK3IjajVn2MbePvqA== +"@testing-library/react@^11.0.2": + version "11.0.2" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-11.0.2.tgz#4588cc537085907bd1d98b531eb247dbbf57b1cc" + integrity sha512-iOuNNHt4ZgMH5trSKC4kaWDcKzUOf7e7KQIcu7xvGCd68/w1EegbW89F9T5sZ4IjS0gAXdvOfZbG9ESZ7YjOug== dependencies: - "@babel/runtime" "^7.10.3" - "@testing-library/dom" "^7.22.3" + "@babel/runtime" "^7.11.2" + "@testing-library/dom" "^7.23.0" "@trendmicro/react-interpolate@^0.5.5": version "0.5.5"