fix(curriculum): allow spaces before brackets (#45494)

* chore(curriculum): update regex in use-braket-notation-* tests

Update regex used in tests, so that tests are more forgiving and spaces tolerant.

* Allow for spaces within brackets
This commit is contained in:
Radi Totev
2022-03-22 12:52:13 +00:00
committed by GitHub
parent 3490a3a956
commit 4d620dea1a
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ assert(firstLetterOfLastName === 'L');
You should use bracket notation.
```js
assert(code.match(/firstLetterOfLastName\s*?=\s*?lastName\[.*?\]/));
assert(code.match(/firstLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/));
```
# --seed--

View File

@ -39,7 +39,7 @@ assert(thirdLetterOfLastName === 'v');
You should use bracket notation.
```js
assert(code.match(/thirdLetterOfLastName\s*?=\s*?lastName\[.*?\]/));
assert(code.match(/thirdLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/));
```
# --seed--