summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/testing/README.md b/testing/README.md
index 3d49c5a76..684d5d4bc 100644
--- a/testing/README.md
+++ b/testing/README.md
@@ -113,27 +113,27 @@ Using `assertThrowsAsync()`:
```ts
test(async function doesThrow() {
- assertThrowsAsync(async () => {
+ await assertThrowsAsync(async () => {
throw new TypeError("hello world!");
});
- assertThrowsAsync(async () => {
+ await assertThrowsAsync(async () => {
throw new TypeError("hello world!");
}, TypeError);
- assertThrowsAsync(
+ await assertThrowsAsync(
async () => {
throw new TypeError("hello world!");
},
TypeError,
"hello"
);
- assertThrowsAsync(async () => {
+ await assertThrowsAsync(async () => {
return Promise.reject(new Error());
});
});
// This test will not pass
test(async function fails() {
- assertThrowsAsync(async () => {
+ await assertThrowsAsync(async () => {
console.log("Hello world");
});
});