File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ export class TestScenario {
9090 for ( const key of Object . keys ( this . handlers ) as Array < keyof typeof this . handlers > ) {
9191 if ( key in step ) {
9292 const value = step [ key ] ;
93- console . log ( 'running handler for ' + key ) ;
9493 void this . handlers [ key ] ( value as any , step ) ;
9594 this . stepIndex ++ ;
9695 return ;
@@ -126,7 +125,7 @@ export class TestScenario {
126125 delay : async ( value : string , step : IStepDefinition ) => {
127126 const nanos = parseTime ( value ) ;
128127 const targetNanos = ( this . client ?. lastNanos ?? 0 ) + nanos ;
129- this . log ( chalk `delay {yellow " ${ value } " }` ) ;
128+ this . log ( chalk `delay {yellow ${ value } }` ) ;
130129 this . eventManager . at ( targetNanos , ( ) => {
131130 void this . nextStep ( ) ;
132131 } ) ;
Original file line number Diff line number Diff line change @@ -97,18 +97,19 @@ async function main() {
9797
9898 const chips = loadChips ( config . chip ?? [ ] , rootDir ) ;
9999
100- if ( scenarioFile && ! existsSync ( scenarioFile ) ) {
101- console . error ( `Error: scenario file not found: ${ path . resolve ( scenarioFile ) } ` ) ;
100+ const resolvedScenarioFile = scenarioFile ? path . resolve ( rootDir , scenarioFile ) : null ;
101+ if ( resolvedScenarioFile && ! existsSync ( resolvedScenarioFile ) ) {
102+ console . error ( `Error: scenario file not found: ${ path . resolve ( resolvedScenarioFile ) } ` ) ;
102103 process . exit ( 1 ) ;
103104 }
104105
105106 const eventManager = new EventManager ( ) ;
106107 const expectEngine = new ExpectEngine ( ) ;
107108
108109 let scenario ;
109- if ( scenarioFile ) {
110+ if ( resolvedScenarioFile ) {
110111 scenario = new TestScenario (
111- YAML . parse ( readFileSync ( scenarioFile , 'utf-8' ) ) ,
112+ YAML . parse ( readFileSync ( resolvedScenarioFile , 'utf-8' ) ) ,
112113 eventManager ,
113114 expectEngine
114115 ) ;
You can’t perform that action at this time.
0 commit comments