-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
document assert usage standards for contributors #333
Comments
I wouldn't say this is specific to that, or any, assert method. If a method exists that expresses what is tested for, we should prefer it. A lot of the assert method can be replaced with just
Edit: I am not suggesting we have to replace all I don't think we have to enforce the use of |
Some context: freeCodeCamp/freeCodeCamp#43105 (comment) I have been advocating for using the specific assertions, because the default assertion messages can be very helpful: freeCodeCamp/freeCodeCamp#40518 We mostly1 do not use them, but I have always hoped we would in the future. Footnotes
|
Would the documentation for the assertion methods would go on this page? https://contribute.freecodecamp.org/#/how-to-work-on-coding-challenges?id=writing-tests |
Describe the Issue
In this PR it was mentioned that
assert.isTrue()
is preferred overassert()
in our codebase.This should be documented somewhere if this is our standard. Also, a lot of the curriculum tests don't use this, so it would be worth making an issue to have someone go change everywhere we missed this standard.
Affected Page
https://contribute.freecodecamp.org/#/codebase-best-practices
Your code
N/A
Expected behavior
Documentation should state standards.
Screenshots
No response
System
All
Additional context
No response
The text was updated successfully, but these errors were encountered: