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:
@ -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--
|
||||
|
@ -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--
|
||||
|
Reference in New Issue
Block a user