I'm from EVM background and I've started learning about Cardano lately. I was just wondering how do I write unit tests for my smart-contract written in Haskell? Since i've been doing unit testing in javascript for solidity, using mocha/chai. Can I use javascript here aswell for uint tests?


1 Answer 1


I find that using the plutus PAB simulator is the best way to first test out your smart contract. Once you confirm the smart contract logic is correct, you then move on to a local dev environment using cardano-cli to deploy your smart contract and run transactions against it. Finally, once that is working, then you are ready for testnet testing which can be done either via the cardano-cli or through javascript wallet integration via Cardano serialization library. This has been my experience to date and it will most likely be improved and be streamlined over time.

You can checkout my repo for some code examples and tips and trick I used for the PAB simulator, devnet and testnet testing.


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.