freeCodeCamp
freeCodeCamp copied to clipboard
fix(curriculum): update test for password generator
Checklist:
- [x] I have read and followed the contribution guidelines.
- [x] I have read and followed the how to open a pull request guide.
- [x] My pull request targets the
mainbranch of freeCodeCamp. - [x] I have tested these changes either locally on my machine, or Gitpod.
Closes #58867
in what way does this solve the issue? can you explain?
As you can see from the console log, the generatePassword function continues add characters to the globally scoped password variable, even though the correct string (valid characters and length of string) is returned by the function.
This PR checks that the global variable password is the expected length.
Here is a new screen grab after the latest update.