Skip to content
Discussion options

You must be logged in to vote

Hey @supafreq! This is a fairly common pattern in traditional software engineering. The idea is to separate the set-up from the idiosyncratic behaviour, such that if there is a need to retest that behaviour in a different context, you can.

Look at how OpenZeppelin does this: https://github.com/OpenZeppelin/openzeppelin-contracts/tree/566a774222707e424896c0c390a84dc3c13bdcb2/test

And also look at Hifi protocol, where I applied this test file division at scale: https://github.com/hifi-finance/hifi-protocol/tree/abf61e8d0a5d872003e92afc3a0d374634c46f53/test

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by supafreq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #51 on July 22, 2021 08:28.