fix(curriculum): replace any character with literal dot in regex (#53873)

This commit is contained in:
Krzysztof G
2024-02-26 10:21:39 +01:00
committed by GitHub
parent adf9769443
commit 511ddc149d
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ assert.match(code, /userData\?\.songs\.sort\(\s*\(\s*\)\s*=>\s*/)
The callback of your `sort()` method should return `Math.random() - 0.5`.
```js
assert.match(code, /userData\?.songs\.sort\s*\(\s*\(\s*\)\s*=>(\s*{\s*return\s+Math\.random\(\s*\)\s*-\s*0\.5\s*;?\s*}\s*)|(\s*Math\.random\(\s*\)\s*-\s*0\.5\s*)\s*\)\s*;?/);
assert.match(code, /userData\?\.songs\.sort\s*\(\s*\(\s*\)\s*=>(\s*{\s*return\s+Math\.random\(\s*\)\s*-\s*0\.5\s*;?\s*}\s*)|(\s*Math\.random\(\s*\)\s*-\s*0\.5\s*)\s*\)\s*;?/);
```
# --seed--

View File

@@ -14,7 +14,7 @@ The last step for the `sortSongs` function is to return `userData?.songs`.
You should return `userData?.songs` at the end of the `sortSongs` function.
```js
assert.match(code, /return\s+userData\?.songs;?/);
assert.match(code, /return\s+userData\?\.songs\s*;?/);
```
# --seed--