fix: reworded text messages (#27072)
This commit is contained in:
@ -22,12 +22,12 @@ Refactor the function <code>setGear</code> inside the object <code>bicycle</code
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: Traditional function expression was not used.
|
||||
testString: getUserInput => assert(!getUserInput('index').match(/function/),'Traditional <code>function</code> expression was not used.');
|
||||
- text: <code>setGear</code> is a declarative function.
|
||||
testString: getUserInput => assert(typeof bicycle.setGear === 'function' && getUserInput('index').match(/setGear\s*\(.+\)\s*\{/), '<code>setGear</code> is a declarative function.');
|
||||
- text: <code>bicycle.setGear(48)</code> changes the <code>gear</code> value to 48.
|
||||
testString: assert((new bicycle.setGear(48)).gear === 48, '<code>bicycle.setGear(48)</code> changes the <code>gear</code> value to 48.');
|
||||
- text: Traditional function expression should not be used.
|
||||
testString: getUserInput => assert(!getUserInput('index').match(/function/));
|
||||
- text: <code>setGear</code> should be a declarative function.
|
||||
testString: getUserInput => assert(typeof bicycle.setGear === 'function' && getUserInput('index').match(/setGear\s*\(.+\)\s*\{/));
|
||||
- text: <code>bicycle.setGear(48)</code> should change the <code>gear</code> value to 48.
|
||||
testString: assert((new bicycle.setGear(48)).gear === 48);
|
||||
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user