Skip to content

test: use top-level import in SignButton tests#458

Merged
gabitoesmiapodo merged 1 commit intodevelopfrom
fix/455-signbutton-test-imports
Apr 10, 2026
Merged

test: use top-level import in SignButton tests#458
gabitoesmiapodo merged 1 commit intodevelopfrom
fix/455-signbutton-test-imports

Conversation

@gabitoesmiapodo
Copy link
Copy Markdown
Collaborator

Summary

Closes #455

SignButton tests used per-test dynamic imports (await import('./SignButton')) unlike the comparable TransactionButton and SwitchNetwork tests, which use standard top-level static imports. This aligns the import pattern for consistency.

Changes

  • Replace 4 per-test await import('./SignButton') calls with a single top-level import SignButton from './SignButton'
  • Remove async from all 4 test callbacks since they no longer contain await

Acceptance criteria

  • SignButton tests use a standard top-level import instead of per-test dynamic imports
  • Import pattern matches TransactionButton.test.tsx and SwitchNetwork.test.tsx
  • All 4 existing tests still pass

Test plan

Automated tests

Modified: src/components/sharedComponents/SignButton.test.tsx
Run: pnpm test src/components/sharedComponents/SignButton.test.tsx

Manual verification

No manual steps required.

Breaking changes

None.

Screenshots

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Replace per-test dynamic imports with a standard static import,
matching the pattern used in TransactionButton and SwitchNetwork tests.

Closes #455
Copilot AI review requested due to automatic review settings April 10, 2026 14:32
@gabitoesmiapodo gabitoesmiapodo self-assigned this Apr 10, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
components.dappbooster Ready Ready Preview, Comment Apr 10, 2026 2:32pm
demo.dappbooster Ready Ready Preview, Comment Apr 10, 2026 2:32pm
docs.dappbooster Ready Ready Preview, Comment Apr 10, 2026 2:32pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns SignButton test import style with other shared component tests by replacing per-test dynamic imports with a single top-level static import, simplifying the test bodies.

Changes:

  • Switch from per-test await import('./SignButton') to a single top-level import SignButton from './SignButton'.
  • Remove unnecessary async from the affected test callbacks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gabitoesmiapodo gabitoesmiapodo merged commit 3cb4415 into develop Apr 10, 2026
13 checks passed
@gabitoesmiapodo gabitoesmiapodo deleted the fix/455-signbutton-test-imports branch April 10, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SignButton test uses per-test dynamic imports unlike similar tests

2 participants