I am looking to create a test script for an application implemented with frontend only code. How do you guys implement unit tests and integration tests for the front end? Also, if you know of any frameworks, libraries or reference projects for testing, please let me know.

For example, we would like to test the following function

  • Connect phantom wallet at the push of a button
  • After connecting the wallet, purchase the NFT

1 Answer 1


I think your question is less about Solana but more about js testing frame works. You can for example use mocha, a popular testing framework to test your react app. https://mochajs.org/ There are some tutorials out there on how to use it.

Here is a list of other js testing frameworks: https://www.browserstack.com/guide/top-javascript-testing-frameworks

Automatically triggering a crypto browser extension sounds like a security risk though it is likely not possible and would be dangerous.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.