Skip to content

Commit

Permalink
Bump testing-library
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jul 15, 2020
1 parent 9882241 commit 42fd050
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 24 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 @@
"@babel/register": "^7.10.1",
"@rollup/plugin-replace": "^2.3.1",
"@testing-library/dom": "^7.0.3",
"@testing-library/react": "^10.0.1",
"@testing-library/react": "^10.4.7",
"@testing-library/react-hooks": "3.3.0",
"@types/chai": "^4.2.3",
"@types/chai-dom": "^0.0.10",
Expand Down
19 changes: 0 additions & 19 deletions scripts/react-next.diff
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,3 @@ index e5733f826..61333a172 100644
});
});
});
diff --git a/test/utils/createClientRender.js b/test/utils/createClientRender.js
index 2b6184ff9..cc38b14ab 100644
--- a/test/utils/createClientRender.js
+++ b/test/utils/createClientRender.js
@@ -87,6 +87,14 @@ function clientRender(element, options = {}) {
return result;
};

+ // TODO: Remove once we switch to `@testing-library/react@10.4.7`
+ const testingLibraryUnmount = result.unmount;
+ result.unmount = function unmountActing() {
+ act(() => {
+ testingLibraryUnmount();
+ });
+ };
+
return result;
}

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2379,10 +2379,10 @@
"@babel/runtime" "^7.5.4"
"@types/testing-library__react-hooks" "^3.0.0"

"@testing-library/react@^10.0.1":
version "10.4.6"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.4.6.tgz#70a7cac35ac8256c22a8cb0c4779e0efefd218c6"
integrity sha512-pVcm8v0HxCEzrtasbC2bdhWM0P5X9o8a/xfBugC97uVVTmhVeGHj+5CdE1JYi/i2K+mCyeq5YqzHLW/gB+K12w==
"@testing-library/react@^10.4.7":
version "10.4.7"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.4.7.tgz#fc14847fb70a5e93576b8f7f0d1490ead02a9061"
integrity sha512-hUYbum3X2f1ZKusKfPaooKNYqE/GtPiQ+D2HJaJ4pkxeNJQFVUEvAvEh9+3QuLdBeTWkDMNY5NSijc5+pGdM4Q==
dependencies:
"@babel/runtime" "^7.10.3"
"@testing-library/dom" "^7.17.1"
Expand Down

0 comments on commit 42fd050

Please sign in to comment.