Skip to content

fix: update tests for useClipboard to minimize risks of flakes #13250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 15, 2024
Prev Previous commit
Next Next commit
docs: add more context to comments
  • Loading branch information
Parkreiner committed May 13, 2024
commit 186f6c89ee905c7c81ba85194bc5efcd8cdb774c
3 changes: 2 additions & 1 deletion site/src/hooks/useClipboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ describe.each(secureContextValues)("useClipboard - secure: %j", (isSecure) => {
* @todo Look into why deferring error-based state updates to the global
* snackbar still kicks up act warnings, even after wrapping copyToClipboard
* in act. copyToClipboard should be the main source of the state
* transitions,
* transitions, but it looks like extra state changes are still getting
* flushed through the GlobalSnackbar component afterwards
*/
setSimulateFailure(true);
await act(() => result.current.copyToClipboard());
Expand Down
Loading