Skip to content

test(web): cover clipboard hook#365

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
0takuc0mrade:issue-317-copy-to-clipboard-hook
Jun 29, 2026
Merged

test(web): cover clipboard hook#365
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
0takuc0mrade:issue-317-copy-to-clipboard-hook

Conversation

@0takuc0mrade

Copy link
Copy Markdown
Contributor

What

  • Add a shared useCopyToClipboard hook for deterministic clipboard writes.
  • Cover copied state toggling and timeout reset with fake timers.
  • Cover clipboard rejection behavior.
  • Restore clipboard stubs and timers after each test.

Testing

  • PASS: npx bun@1.3.13 test --preload ./setup-tests.ts src/shared/hooks/useCopyToClipboard.test.ts
  • PARTIAL: npx bun@1.3.13 run --cwd apps/web test started, and the new clipboard tests passed within the full run. The broader suite reported pre-existing failures in src/lib/stellar/horizon.test.ts, src/lib/stellar/explorer.test.ts, and src/shared/components/NumberInput.test.tsx, then the command stopped producing output and was interrupted after several minutes.

Closes #317

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@0takuc0mrade is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@0takuc0mrade Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@IbrahimIjai IbrahimIjai merged commit 3c6d0bf into SO4-Markets:main Jun 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web shared: copy-to-clipboard hook

2 participants