fix(curriculum): stop false positives in test for array hard coding (#42461)

* Fixed test regex to avoid false matches

* Changed regex to only match values in globalArray

* Revert non-English changes
This commit is contained in:
awu43
2021-06-15 08:35:35 -07:00
committed by GitHub
parent dba157e7c0
commit ae0d34359a

View File

@ -40,7 +40,7 @@ assert(
`nonMutatingSort(globalArray)` should not be hard coded. `nonMutatingSort(globalArray)` should not be hard coded.
```js ```js
assert(!nonMutatingSort.toString().match(/[23569]/g)); assert(!nonMutatingSort.toString().match(/\[.*?[23569].*?\]/gs));
``` ```
The function should return a new array, not the array passed to it. The function should return a new array, not the array passed to it.