fix(challenge): add support for IIFE arrow function (#35573)
* fix(challenge): add support for IIFE arrow function * fix(challenge): update regexpull/27505/head
parent
b140d05599
commit
88a5d46ccb
|
@ -22,9 +22,9 @@ Rewrite the function <code>makeNest</code> and remove its call so instead it's a
|
|||
```yml
|
||||
tests:
|
||||
- text: The function should be anonymous.
|
||||
testString: assert(/\(\s*?function\s*?\(\s*?\)\s*?{/.test(code), 'The function should be anonymous.');
|
||||
testString: assert(/\((function|\(\))(=>|\(\)){/.test(code.replace(/\s/g, "")));
|
||||
- text: Your function should have parentheses at the end of the expression to call it immediately.
|
||||
testString: assert(/}\s*?\)\s*?\(\s*?\)/.test(code), 'Your function should have parentheses at the end of the expression to call it immediately.');
|
||||
testString: assert(/}\)\(\)/.test(code.replace(/\s/g, "")));
|
||||
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue