@@ -14,6 +14,7 @@ import {WASM} from '../sourcemap/Wasm';
1414import { DummyProxy } from '../testbeds/Emulator' ;
1515import { ScenarioResult , Skipped , StepOutcome , SuiteResult } from '../reporter/Results' ;
1616import { Verifier } from './Verifier' ;
17+ import { stringify } from "../util/util" ;
1718
1819export function timeout < T > ( label : string , time : number , promise : Promise < T > ) : Promise < T > {
1920 if ( time === 0 ) {
@@ -211,9 +212,10 @@ export class Testee { // TODO unified with testbed interface
211212 }
212213
213214 for ( const step of description . steps ?? [ ] ) {
215+ const verifier : Verifier = new Verifier ( step ) ;
216+
214217 /** Perform the step and check if expectations were met */
215218 await this . step ( step . title , testee . timeout , async function ( ) {
216- const verifier : Verifier = new Verifier ( step ) ;
217219 if ( testee . bed ( step . target ?? Target . supervisor ) === undefined ) {
218220 testee . states . set ( description . title , verifier . error ( 'Cannot run test: no debugger connection.' ) ) ;
219221 return ;
@@ -246,6 +248,10 @@ export class Testee { // TODO unified with testbed interface
246248 previous = actual ;
247249 }
248250
251+ testee . states . set ( description . title , result ) ;
252+ scenarioResult . add ( result ) ;
253+ } ) . catch ( ( error : Error | string ) => {
254+ const result = verifier . error ( stringify ( error ) ) ;
249255 testee . states . set ( description . title , result ) ;
250256 scenarioResult . add ( result ) ;
251257 } ) ;
0 commit comments