fix(curriculum): Improved the tests for Find the length of a String challenge #35940
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.
Update index.md
)master
branch of freeCodeCamp.I have noticed a few campers get confused regarding the test messages for this challenge. The reason for the confusion is if the user changes the original setup code, but the code would still technically result in the correct solution, the test message would fail but the reason given would not match the reason stated because the test combines the following checks but displays "You should be getting the length of lastName by using .length like this: lastName.length." if either fail.
See https://www.freecodecamp.org/forum/t/help-w-js-challenge-suspected-bug/274365 for the full discussion.
This PR creates an additional test to make sure the user does not change the original setup code which the tests use.