Assessment reports>Palmy Finance>Discussion>Test suite

Test suite

During the audit of the scoped contracts, we observed opportunities for enhancing the test suite to better align with our standards for testing in typical projects.

Implementing comprehensive test suites is crucial to identify potential bugs and ensure that the system behaves as expected. In efforts to do this, we recommend the project to strive for 100% code coverage. For instance, Finding could have been identified in the development workflow if the tests had covered the close function.

We could see that many of the tests were utilizing mocking contracts. Because mocking contracts often behave differently compared to the actual contracts, our general recommendations are minimizing the usage of mocking contracts in tests and replacing them with the actual contracts the target contract is supposed to operate with.

Besides testing the entire codebase, it is also important to ensure that all functions actually behave as expected. Finding could have been identified in the development workflow if the tests had considered the case, assuming that time passed since the deployment of the contract.

Zellic © 2025Back to top ↑