From 8b8e27bf37631ff6bca4d9d313b61ab1dd69c0d0 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:26:48 +1300 Subject: [PATCH] fix(curriculum): test for unique characters (#62544) --- .../lab-password-generator/66f53dc2c5bd6a11d6c3282f.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/curriculum/challenges/english/blocks/lab-password-generator/66f53dc2c5bd6a11d6c3282f.md b/curriculum/challenges/english/blocks/lab-password-generator/66f53dc2c5bd6a11d6c3282f.md index 88989895aab..e0a71d17b8d 100644 --- a/curriculum/challenges/english/blocks/lab-password-generator/66f53dc2c5bd6a11d6c3282f.md +++ b/curriculum/challenges/english/blocks/lab-password-generator/66f53dc2c5bd6a11d6c3282f.md @@ -52,6 +52,15 @@ for (let char of password) { } ``` +Your function should return a randomly generated password which contains more than one unique character. + +```js +const passwordSetSize1 = new Set(generatePassword(12)).size; +const passwordSetSize2 = new Set(generatePassword(12)).size; +const passwordSetSize3 = new Set(generatePassword(12)).size; +assert.isAbove(passwordSetSize1 + passwordSetSize2 + passwordSetSize3, 3); +``` + Your function should return a new random string each time it is called. ```js