fix(curriculum): accept both multiplication orders in getRandomIndex test (#64233)

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
This commit is contained in:
SamareshSingh 2025-12-01 14:35:00 -06:00 committed by GitHub
parent db4aa92b1f
commit 770f926e00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,7 @@ assert.isArray(darkColorsArr);
You should fix the capitalization error in the `math.random()` line.
```js
assert.match(getRandomIndex.toString(), /\s*darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)\s*/);
assert.match(getRandomIndex.toString(), /\s*(darkColorsArr\.length\s*\*\s*Math\.random\(\s*\)|Math\.random\(\s*\)\s*\*\s*darkColorsArr\.length)\s*/);
```
You should round `darkColorsArr.length * Math.random()` down to the nearest whole number.