Questions tagged [unit-test]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

How do I test my smart-contract on Cardano

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 ...
user avatar
0 votes
1 answer
49 views

Examples of testing on-chain code

There are extensive examples for the testing frameworks for contracts, ie off-chain code, for example as discussed in Lecture 8 of the plutus pioneer program https://youtu.be/zW3D2iM5uVg. Its ...
user avatar
  • 333
0 votes
0 answers
30 views

Working with time in tests

I'm trying to write some tests for EnglishAuction, from Plutus pioneers #1. I want to write a test that first starts an auction and then tries to close an auction before the deadline has passed (...
user avatar
3 votes
0 answers
37 views

Test for logError in Trace monad

How do I write a Tasty unit-test for an error that may be logged from inside the Trace monad? import Control.Monad.Freer.Extras (logError, throwError) trace1 :: Input -> Trace.EmulatorTrace () ...
user avatar
  • 490
11 votes
1 answer
146 views

How can I write unit tests for Plutus contracts?

I'm a member of Plutus Pioneer Program. I already know about the Plutus Playground and like it very much. However, clicking all the blockchain action scenarios each time is very time-consuming, ...
user avatar
  • 766