Skip to content

Commit

Permalink
fix: should resolve current context before sub-context
Browse files Browse the repository at this point in the history
  • Loading branch information
climba03003 committed Apr 14, 2024
1 parent 555cf9c commit eccfba0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/unit/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ function wrapTest (testFn: any): Test {
})

await completed.promise
// resolve sub context
await Promise.all(contextPromises)
// resolve current context
await Promise.race([promise.promise, fnPromise])
// resolve sub context
await Promise.all(contextPromises)

teardown()
}
Expand Down

0 comments on commit eccfba0

Please sign in to comment.