closerdao / proof-of-presence

TDF smart contracts
MIT License
2 stars 3 forks source link

Reverts should be tested in Dynamic sale #52

Open arturictus opened 1 year ago

arturictus commented 1 year ago

We should make sure that reverts are triggered for the right reasons and the protect efficiently a right full buy

arturictus commented 1 year ago

Here is an example of how I create helpers to test https://github.com/closerdao/proof-of-presence/blob/99d298b5d8e5b328b02bcc38eacd5885435ac035/test/utils/diamond/adminHelpers.ts#L9-L117

Here are the tests using those helpers: https://github.com/closerdao/proof-of-presence/blob/99d298b5d8e5b328b02bcc38eacd5885435ac035/test/diamond/MembershipFacet.test.ts#L24

The missing tests are here: https://github.com/closerdao/proof-of-presence/blob/99d298b5d8e5b328b02bcc38eacd5885435ac035/test/DynamicSale.test.ts#L62