fix(curriculum): test for unique characters (#62544)

This commit is contained in:
Supravisor
2025-10-08 20:26:48 +13:00
committed by GitHub
parent 8238495c8b
commit 8b8e27bf37

View File

@@ -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