@testing-library/react-hooks
Advanced tools
Comparing version 8.0.0 to 8.0.1
@@ -84,9 +84,8 @@ "use strict"; | ||
renderProps = props; | ||
(0, _testUtils.act)(() => { | ||
try { | ||
serverOutput = ReactDOMServer.renderToString(testHarness(props)); | ||
} catch (e) { | ||
rendererProps.setError(e); | ||
} | ||
}); | ||
try { | ||
serverOutput = ReactDOMServer.renderToString(testHarness(props)); | ||
} catch (e) { | ||
rendererProps.setError(e); | ||
} | ||
}, | ||
@@ -93,0 +92,0 @@ |
{ | ||
"name": "@testing-library/react-hooks", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"description": "Simple and complete React hooks testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -50,2 +50,3 @@ <div align="center"> | ||
Please be patient as we finalise these changes in the respective testing libraries. | ||
In the mean time you can install `@testing-library/react@^13.1` | ||
@@ -201,3 +202,3 @@ ## Table of Contents | ||
<td align="center"><a href="https://gillchristian.xyz"><img src="https://avatars2.githubusercontent.com/u/8309423?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Christian Gill</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=gillchristian" title="Documentation">π</a></td> | ||
<td align="center"><a href="https://jsjoe.io"><img src="https://avatars3.githubusercontent.com/u/3806031?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JavaScript Joe</b></sub></a><br /><a href="#tutorial-jsjoeio" title="Tutorials">β </a></td> | ||
<td align="center"><a href="https://jsjoe.io"><img src="https://avatars3.githubusercontent.com/u/3806031?v=4?s=100" width="100px;" alt=""/><br /><sub><b>JavaScript Joe</b></sub></a><br /><a href="#tutorial-jsjoeio" title="Tutorials">β </a> <a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=jsjoeio" title="Tests">β οΈ</a></td> | ||
</tr> | ||
@@ -204,0 +205,0 @@ <tr> |
@@ -16,3 +16,3 @@ import * as ReactDOMServer from 'react-dom/server' | ||
let container: HTMLDivElement | undefined | ||
let serverOutput: string = '' | ||
let serverOutput = '' | ||
const testHarness = createTestHarness(rendererProps, wrapper, false) | ||
@@ -23,9 +23,7 @@ | ||
renderProps = props | ||
act(() => { | ||
try { | ||
serverOutput = ReactDOMServer.renderToString(testHarness(props)) | ||
} catch (e: unknown) { | ||
rendererProps.setError(e as Error) | ||
} | ||
}) | ||
try { | ||
serverOutput = ReactDOMServer.renderToString(testHarness(props)) | ||
} catch (e: unknown) { | ||
rendererProps.setError(e as Error) | ||
} | ||
}, | ||
@@ -32,0 +30,0 @@ hydrate() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138285
99
2856
307