From 7adfaa8e2dd64a7c34fd84ee7bfa30c9b73debdd Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Tue, 11 Oct 2022 13:19:05 +0800 Subject: [PATCH] review --- packages/jest-circus/src/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/jest-circus/src/index.ts b/packages/jest-circus/src/index.ts index 760c4a2832ce..a8049d4d1d8c 100644 --- a/packages/jest-circus/src/index.ts +++ b/packages/jest-circus/src/index.ts @@ -186,10 +186,8 @@ const test: Global.It = (() => { ) => void, timeout?: number, failing?: boolean, - asyncError?: Error, + asyncError: Error = new ErrorWithStack(undefined, testFn), ) => { - asyncError = asyncError || new ErrorWithStack(undefined, testFn); - try { testName = convertDescriptorToString(testName); } catch (error) {