freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

fix(curriculum): update test for password generator

Open Supravisor opened this issue 10 months ago • 3 comments

Checklist:

Closes #58867

image

Supravisor avatar Feb 18 '25 19:02 Supravisor

in what way does this solve the issue? can you explain?

majestic-owl448 avatar Feb 20 '25 12:02 majestic-owl448

image

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.

Supravisor avatar Feb 21 '25 00:02 Supravisor

Here is a new screen grab after the latest update.

image

Supravisor avatar Feb 26 '25 00:02 Supravisor