Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite tests. #18

Open
2 of 6 tasks
a-t-0 opened this issue Apr 30, 2024 · 0 comments
Open
2 of 6 tasks

Rewrite tests. #18

a-t-0 opened this issue Apr 30, 2024 · 0 comments

Comments

@a-t-0
Copy link
Member

a-t-0 commented Apr 30, 2024

  • Apply the 1 test one task principle.
  • Sort the tests SetUp() functions on what they need per file, and create a single function in the test folder that generates those requirements, and call that function from the SetUp() functions, instead of cluttering each test with a large SetUp() function (and its accompanying imports).
  • NEXT UP: Apply loading the _dim from the InitialiseDim.sol contract like in ReceiveAcceptedOffer.t.sol.
  • Move the unit tests into functional tests and unit tests. Per test, determine if it is functional or unit and when you move it, create a docstring that describes what it tests, and copy the setup.
    • If you put the first test in a functional file test, create a documentation list of all the functionalities that that file will test.
    • If a functional test should not be in a method functional test file, put it in the file whose functionality is tested (most), and give the test filename one that describes the functionality that is being tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant