Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The following content seems to be partially correct and could use some clarification. The path to the content is:
public/content/developers/docs/smart-contracts/testing
The content is:
"Tests should have good code coverage, otherwise you may get "false negatives" which happen a contract passes all tests, but vulnerabilities still exist in the code."
The rewrite for the above text should go like:
"Tests should have good code coverage to minimize the risk of untested vulnerabilities. Without sufficient coverage, you might falsely assume your contract is secure because all tests pass, while vulnerabilities still exist in untested code paths."
Explanation:
Code Coverage and "False Negatives":
Code coverage measures how much of your code is executed during testing. High code coverage ensures that most (or all) lines of your code have been tested at least once.
Low code coverage can indeed lead to untested portions of code where vulnerabilities or bugs may reside. This might create a false sense of security, as your tests pass without actually verifying the behavior of the untested code.
Misinterpretation of "False Negatives":
Technically, a false negative in testing occurs when the test fails to detect an issue that exists. In the context of your statement, what you're describing is not a "false negative" but rather uncovered vulnerabilities or bugs due to inadequate test coverage.