| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 18c9496 commit fb98fa4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,6 @@ const { | |||
| 17 | 17 | ArrayPrototypeSort, | |
| 18 | 18 | ObjectAssign, | |
| 19 | 19 | PromisePrototypeThen, | |
| 20 | - PromiseResolve, | ||
| 21 | 20 | PromiseWithResolvers, | |
| 22 | 21 | SafeMap, | |
| 23 | 22 | SafePromiseAll, | |
@@ -798,9 +797,17 @@ function run(options = kEmptyObject) { | |||
| 798 | 797 | } | |
| 799 | 798 | } | |
| 800 | 799 | ||
| 801 | - const setupPromise = PromiseResolve(setup?.(root.reporter)); | ||
| 802 | - PromisePrototypeThen(PromisePrototypeThen(PromisePrototypeThen(setupPromise, runFiles), postRun), teardown); | ||
| 800 | + const runChain = async () => { | ||
| 801 | + if (typeof setup === 'function') { | ||
| 802 | + await setup(root.reporter); | ||
| 803 | + } | ||
| 804 | + | ||
| 805 | + await runFiles(); | ||
| 806 | + postRun?.(); | ||
| 807 | + teardown?.(); | ||
| 808 | + }; | ||
| 803 | 809 | ||
| 810 | + runChain(); | ||
| 804 | 811 | return root.reporter; | |
| 805 | 812 | } | |
| 806 | 813 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments