From 0de3b3ceb89cb4132cd6407faf7d813ff391bf5e Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Tue, 11 Oct 2022 13:16:59 +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..f7af0d421db4 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) {