File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ export class ScenarioResult {
8282 public results : Result [ ] = [ ] ;
8383 public error ?: Error ;
8484
85+
8586 constructor ( test : TestScenario , testee : Testee ) {
8687 this . test = test ;
8788 this . testee = testee ;
Original file line number Diff line number Diff line change @@ -159,14 +159,16 @@ export class Testee { // TODO unified with testbed interface
159159 } catch ( e ) {
160160 await testee . initialize ( description . program , description . args ?? [ ] ) . catch ( ( o ) => Promise . reject ( o ) ) ;
161161 }
162- } ) . catch ( ( e : Error ) => {
163- scenarioResult . error = e ;
162+ } ) . catch ( ( e : Error | string ) => {
163+ if ( typeof e === 'string' ) scenarioResult . error = new Error ( e ) ;
164+ else scenarioResult . error = e ;
164165 } ) ;
165166
166167 await this . run ( 'Get source mapping' , testee . connector . timeout , async function ( ) {
167168 map = await testee . mapper . map ( description . program ) ;
168- } ) . catch ( ( e : Error ) => {
169- scenarioResult . error = e ;
169+ } ) . catch ( ( e : Error | string ) => {
170+ if ( typeof e === 'string' ) scenarioResult . error = new Error ( e ) ;
171+ else scenarioResult . error = e ;
170172 } ) ;
171173
172174 if ( scenarioResult . error ) {
You can’t perform that action at this time.
0 commit comments