File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -123,12 +123,12 @@ export class TestBrokerViewModel extends Observable {
123123 . then ( ( scriptsContents : IScriptInfo [ ] ) => setTimeout ( ( ) => this . runTests ( scriptsContents ) , 0 ) ) ;
124124 }
125125
126- public runTests ( scripts : IScriptInfo [ ] ) : void {
126+ public async runTests ( scripts : IScriptInfo [ ] ) : Promise < void > {
127127 const errors = this . testExecutionService . runTests ( scripts ) ;
128128 errors . forEach ( err => this . error ( err . msg , err . url , err . line ) ) ;
129129
130130 try {
131- executeWebpackTests ( ) ;
131+ await executeWebpackTests ( ) ;
132132 } catch ( e ) {
133133 this . error ( `${ e ?. message || e } ` ) ;
134134 }
Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ export interface RunTestAppOptions {
1313
1414export function runTestApp ( options : RunTestAppOptions = { } ) {
1515 if ( options ?. runTests ) {
16- registerTestRunner ( ( ) => {
17- options . runTests ( ) ;
18- } ) ;
16+ registerTestRunner ( options . runTests ) ;
1917 }
2018 Application . run ( { moduleName : "bundle-app-root" } ) ;
2119}
Original file line number Diff line number Diff line change 11let runTests : ( ) => unknown ;
22
3- export function registerTestRunner ( testRunner : ( ) => unknown ) {
3+ export function registerTestRunner ( testRunner : ( ) => unknown | Promise < unknown > ) {
44 runTests = testRunner ;
55}
66
77
8- export function executeWebpackTests ( ) {
9- runTests ?.( ) ;
8+ export async function executeWebpackTests ( ) {
9+ await runTests ?.( ) ;
1010}
You can’t perform that action at this time.
0 commit comments