File tree 3 files changed +6
-8
lines changed
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 {
123
123
. then ( ( scriptsContents : IScriptInfo [ ] ) => setTimeout ( ( ) => this . runTests ( scriptsContents ) , 0 ) ) ;
124
124
}
125
125
126
- public runTests ( scripts : IScriptInfo [ ] ) : void {
126
+ public async runTests ( scripts : IScriptInfo [ ] ) : Promise < void > {
127
127
const errors = this . testExecutionService . runTests ( scripts ) ;
128
128
errors . forEach ( err => this . error ( err . msg , err . url , err . line ) ) ;
129
129
130
130
try {
131
- executeWebpackTests ( ) ;
131
+ await executeWebpackTests ( ) ;
132
132
} catch ( e ) {
133
133
this . error ( `${ e ?. message || e } ` ) ;
134
134
}
Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ export interface RunTestAppOptions {
13
13
14
14
export function runTestApp ( options : RunTestAppOptions = { } ) {
15
15
if ( options ?. runTests ) {
16
- registerTestRunner ( ( ) => {
17
- options . runTests ( ) ;
18
- } ) ;
16
+ registerTestRunner ( options . runTests ) ;
19
17
}
20
18
Application . run ( { moduleName : "bundle-app-root" } ) ;
21
19
}
Original file line number Diff line number Diff line change 1
1
let runTests : ( ) => unknown ;
2
2
3
- export function registerTestRunner ( testRunner : ( ) => unknown ) {
3
+ export function registerTestRunner ( testRunner : ( ) => unknown | Promise < unknown > ) {
4
4
runTests = testRunner ;
5
5
}
6
6
7
7
8
- export function executeWebpackTests ( ) {
9
- runTests ?.( ) ;
8
+ export async function executeWebpackTests ( ) {
9
+ await runTests ?.( ) ;
10
10
}
You can’t perform that action at this time.
0 commit comments