From 8d55535752bc99575256764fb3ba0063567aaaa9 Mon Sep 17 00:00:00 2001 From: stefanprobst Date: Sat, 6 Apr 2024 09:41:49 +0200 Subject: [PATCH] docs: update assert.throws docs --- docs/api.assert.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.assert.md b/docs/api.assert.md index ec06d1f..508b82f 100644 --- a/docs/api.assert.md +++ b/docs/api.assert.md @@ -118,7 +118,7 @@ assert.fixture( Assert that the `fn` function throws an Error. When `expects` is not defined, then _any_ Error thrown satisfies the assertion.
-When `expects` is a string, then the `Error`'s message must contain the `expects` string.
+When `expects` is a `RegExp`, then the `Error`'s message must match the `expects` regular expression.
When `expects` is a function, then `expects` will receive the thrown `Error` and must return a `boolean` determination. Since `expects` is optional, you may also invoke the `assert.throws(fn, msg)` signature.