Skip to content

Conversation

tobeycodes
Copy link
Collaborator

Problem

It is not currently possible to test React code in the React package

Summary of Changes

  1. Adds React Testing Library https://github.com/testing-library/react-testing-library
  2. Adds a very basic test for the useSolanaClient hook to test implementation

Fixes #97

Copy link

changeset-bot bot commented Sep 11, 2025

⚠️ No Changeset found

Latest commit: 0b8b490

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: i could not find instances of this -test.*.ts pattern in existing test naming conventions so updated it to match how test files are currently named.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: i do not think the testing dependencies should be at the root package.json but the existing jest packages are there so continuining this pattern

Comment on lines -66 to -70
"devDependencies": {
"@types/react": "^18",
"@types/react-test-renderer": "^18",
"react": "^18"
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: i believe we should only be using peer dependencies for react

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.

[react] how to test gill-react hooks
1 participant