Skip to content

Commit

Permalink
asyncHelpers implementation: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
  • Loading branch information
cjtenny and ptomato committed Feb 21, 2023
1 parent df59ce4 commit b5e7e09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ includes: [asyncHelpers.js]

asyncTest(async function() {
assert.sameValue(true, await someTestCode(1), "someTestCode(1) should return true");
;
});
```

Expand All @@ -367,7 +366,7 @@ For more complicated asynchronous testing, such as testing Promise or other core

* If the argument to `$DONE` is a truthy value, the test is considered to have failed and the argument is displayed as the failure reason.

### Checking Exception Type and Message in Asynchronous Tests
### Checking Exception Type in Asynchronous Tests

The `asyncHelpers.js` harness file defines `assert.throwsAsync`, analogous in form to `assert.throws`. It requires that the passed function _asynchronously_ throws the specified exception type, and will reject functions that synchronously throw the specified exception type (and presumably summon [Zalgo](https://blog.izs.me/2013/08/designing-apis-for-asynchrony/)).

Expand Down

0 comments on commit b5e7e09

Please sign in to comment.