File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ const {
2323 SafeMap,
2424 SafePromiseAll,
2525 SafePromiseAllReturnVoid,
26- SafePromisePrototypeFinally,
2726 SafePromiseRace,
2827 SafeSet,
2928 StringPrototypeStartsWith,
@@ -1259,27 +1258,20 @@ class Suite extends Test {
12591258 this . skipped = false ;
12601259 }
12611260
1261+ this . buildSuite = this . createBuild ( ) ;
1262+ this . fn = noop ;
1263+ }
1264+
1265+ async createBuild ( ) {
12621266 try {
12631267 const { ctx, args } = this . getRunArgs ( ) ;
12641268 const runArgs = [ this . fn , ctx ] ;
12651269 ArrayPrototypePushApply ( runArgs , args ) ;
1266- this . buildSuite = SafePromisePrototypeFinally (
1267- PromisePrototypeThen (
1268- PromiseResolve ( ReflectApply ( this . runInAsyncScope , this , runArgs ) ) ,
1269- undefined ,
1270- ( err ) => {
1271- this . fail ( new ERR_TEST_FAILURE ( err , kTestCodeFailure ) ) ;
1272- } ) ,
1273- ( ) => this . postBuild ( ) ,
1274- ) ;
1270+ await ReflectApply ( this . runInAsyncScope , this , runArgs ) ;
12751271 } catch ( err ) {
12761272 this . fail ( new ERR_TEST_FAILURE ( err , kTestCodeFailure ) ) ;
1277- this . postBuild ( ) ;
12781273 }
1279- this . fn = noop ;
1280- }
12811274
1282- postBuild ( ) {
12831275 this . buildPhaseFinished = true ;
12841276 }
12851277
You can’t perform that action at this time.
0 commit comments