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

(Fix test bug): Step 86 of "Building a Platformer Game" #54541

Closed
katereverie opened this issue Apr 26, 2024 · 1 comment · Fixed by #54549
Closed

(Fix test bug): Step 86 of "Building a Platformer Game" #54541

katereverie opened this issue Apr 26, 2024 · 1 comment · Fixed by #54549
Labels
help wanted Open for all. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@katereverie
Copy link
Contributor

katereverie commented Apr 26, 2024

Describe the Issue

The code provided below should pass; it doesn't.
As to why it doesn't pass, the hint message is not clear enough in terms of its wording, assuming that the test is to remain.

Affected Page

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-intermediate-oop-by-building-a-platformer-game/step-86

Your code

if (collisionDetectionRules.every(rule => rule === true)) {
  player.velocity.y = 0;
  return;
}

Expected behavior

The callback passed into the every() method checks whether each rule element of the collisionDetectionRules array is strictly equal to true.
I assumed that this is what the instruction is asking for.
The hint message also suggests that because "is true" indicates "identity" instead of "evaluate to".
After figuring out what the test is looking for, I understood that the test looks for a returned value that evaluates to true, which would also include truthy values.
If that is the case, I suggest either modifying the test to allow strict equal as well or updating the instruction to hint at what the test is looking for specifically.

Screenshots

Screenshot 2024-04-26 at 09-25-14 freeCodeCamp org

System

  • Device: Laptop
  • OS: Windows 11
  • Browser: FireFox
  • Version: 125.0.2 (64-bit)

Additional context

No response

@katereverie katereverie added scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. labels Apr 26, 2024
@gikf gikf added the new javascript course These are for issues dealing with the new JS curriculum label Apr 26, 2024
@naomi-lgbt
Copy link
Member

Let's update the text here to say "is truthy".

@naomi-lgbt naomi-lgbt added help wanted Open for all. You do not need permission to work on these. and removed new javascript course These are for issues dealing with the new JS curriculum labels Apr 26, 2024
@gikf gikf removed the status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. label Apr 27, 2024
@jdwilkin4 jdwilkin4 added the new javascript course These are for issues dealing with the new JS curriculum label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. new javascript course These are for issues dealing with the new JS curriculum scope: curriculum Lessons, Challenges, Projects and other Curricular Content in curriculum directory. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
4 participants