From 8ac3d47cfea527d4f57ffef1df27aa45d4c59326 Mon Sep 17 00:00:00 2001 From: Jon Ege Ronnenberg Date: Thu, 27 Oct 2022 17:41:22 +0200 Subject: [PATCH] docs: changed `toThrow` to `toThrowError` (#2217) --- docs/api/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index b6196f688..97de0027e 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -393,7 +393,7 @@ When you use `test` or `bench` in the top level of file, they are collected as p describe('numberToCurrency', () => { describe('given an invalid number', () => { test('composed of non-numbers to throw error', () => { - expect(() => numberToCurrency('abc')).toThrow() + expect(() => numberToCurrency('abc')).toThrowError() }) }) @@ -868,7 +868,7 @@ When you use `test` or `bench` in the top level of file, they are collected as p ``` :::warning - A _deep equality_ will not be performed for `Error` objects. To test if something was thrown, use [`toThrow`](#tothrow) assertion. + A _deep equality_ will not be performed for `Error` objects. To test if something was thrown, use [`toThrowError`](#tothrowerror) assertion. ::: ### toStrictEqual -- 2.51.2