From 4d5391c254d3785b552c1debab212de15786ae12 Mon Sep 17 00:00:00 2001 From: Cam Date: Fri, 17 Feb 2023 13:46:00 -0800 Subject: [PATCH] asyncHelpers implementation: Apply suggestions from code review Co-authored-by: Philip Chimento --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74f40a0e169..a839f18332a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -357,7 +357,6 @@ includes: [asyncHelpers.js] asyncTest(async function() { assert.sameValue(true, await someTestCode(1), "someTestCode(1) should return true"); -; }); ``` @@ -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/)).