dao-contracts icon indicating copy to clipboard operation
dao-contracts copied to clipboard

Improve Testing Experience

Open Callum-A opened this issue 2 years ago • 2 comments

It's coming to the time when testing needs to be focused on as this project grows, here are some ideas I have so far:

  • Place tests under a subdir and separate by file on components e.g. src/tests/absolute_count.rs, src/tests/percentage.rs
  • Move common test code to a package e.g. moving all ContractWrapper calls into a package (so we don't have to implement CW20 wrapper in every contract lol)
  • Common voting module setup should also be extracted to a package as I see us using this often
  • Enhanced test suite, would be nice (maybe not possible) to give a test a proposal module and the instantiate info and have it run a set amount of tests against it

Callum-A avatar May 21 '22 20:05 Callum-A

Not expecting all of this to be done as one, more something to aim towards

Callum-A avatar May 21 '22 20:05 Callum-A

@janitachalam has started on this in her multiple choice proposal contract, we just need to use these utils where appropriate in other contracts

Callum-A avatar Jul 06 '22 11:07 Callum-A

@0xekez has been implementing a lot of this in his v2 refactor. Think much of this has been implemented, so closing or this issue will be around forever. Feel free to reopen as smaller scoped tickets.

JakeHartnell avatar Oct 29 '22 20:10 JakeHartnell