Closed aleeusgr closed 5 months ago
I am thinking that it would be better if there was a more explicit item in test-context that can have its own class, instead of being an extension of the VitestContext (as the Vitest people suggest).
https://discord.com/channels/@me/960928001791512576/1119677503573864458
It would be in the beforeEach for the test.
beforeEach<localTC>(async (context) => {
await addTestContext(context, CommunityTreasury, CCTHelpers);
});
Restructuring it would make the setup syntax simpler.
For instance, any testing context would have actors. Which actors? Depends on the contract and how the developer wants to arrange them.
I think setup() is part of the test-helpers - so not necessarily used in every contract test On the other hand, it's probably a useful part of the base-class and a good convention for any contract test.
https://www.typescriptlang.org/docs/handbook/interfaces.html