fix(curriculum): prevent submitting array instead of string (#41720)
* fix(curriculum) prevent users from submitting an array instead of string * use strict equality instead of new test * Add suggestions from Tom Co-authored-by: Tom <20648924+moT01@users.noreply.github.com> Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>pull/41787/head
parent
6325c071fb
commit
21c8500f94
|
@ -21,7 +21,7 @@ Write a regex and use the appropriate string methods to remove whitespace at the
|
|||
`result` should be equal to the string `Hello, World!`
|
||||
|
||||
```js
|
||||
assert(result == 'Hello, World!');
|
||||
assert(result === 'Hello, World!');
|
||||
```
|
||||
|
||||
Your solution should not use the `String.prototype.trim()` method.
|
||||
|
@ -30,10 +30,10 @@ Your solution should not use the `String.prototype.trim()` method.
|
|||
assert(!code.match(/\.?[\s\S]*?trim/));
|
||||
```
|
||||
|
||||
The `result` variable should not be set equal to a string.
|
||||
The `result` variable should not directly be set to a string
|
||||
|
||||
```js
|
||||
assert(!code.match(/result\s*=\s*".*?"/));
|
||||
assert(!code.match(/result\s*=\s*["'`].*?["'`]/));
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
|
Loading…
Reference in New Issue