Fix/curriculum en es6 complete a promise - modified test messages to be more clearer (#38836)

* Changed tests messages to indicate string

* minor tweak with wording of message

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Paul Gamble
2020-05-19 06:44:59 -04:00
committed by GitHub
parent 631c20f26b
commit 54d59ffc37

View File

@ -32,9 +32,9 @@ Make the promise handle success and failure. If <code>responseFromServer</code>
```yml
tests:
- text: <code>resolve</code> should be executed when the <code>if</code> condition is <code>true</code>.
- text: <code>resolve</code> should be called with the expected string when the <code>if</code> condition is <code>true</code>.
testString: assert(removeJSComments(code).match(/if\s*\(\s*responseFromServer\s*\)\s*{\s*resolve\s*\(\s*('|"|`)We got the data\1\s*\)(\s*|\s*;\s*)}/g));
- text: <code>reject</code> should be executed when the <code>if</code> condition is <code>false</code>.
- text: <code>reject</code> should be called with the expected string when the <code>if</code> condition is <code>false</code>.
testString: assert(removeJSComments(code).match(/}\s*else\s*{\s*reject\s*\(\s*('|"|`)Data not received\1\s*\)(\s*|\s*;\s*)}/g));
```