Skip to content

Latest commit

 

History

History

plutarch-test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Plutarch tests and benchmarks

To run the tests using Nix:

$ cd $projectroot/plutarch-test
# Runs tests
$ nix run .#test-ghc9
# To run the above in GHC 8.10 instead:
$ nix run .#test-ghc810

To run the tests using ghcid (fit for writing tests):

bin/ghcid test

To run ghcid with development flag set:

bin/ghcid test:dev

Note: cabal run should be run inside ./plutarch-test directory.

Goldens

Navigation

To quickly navigate and preview the golden files in the terminal, run:

nix run nixpkgs#ranger -- ./plutarch-test/goldens/

Then hit zv to toggle on preview. Use hjkl to naviate.

Reset

When writing tests you may want to clean up working copy goldens, and start from base. To do this, run:

rm plutarch-test/goldens/*.golden; git restore --source=HEAD --staged --worktree -- plutarch-test/goldens/