File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ export class TestScenario {
90
90
for ( const key of Object . keys ( this . handlers ) as Array < keyof typeof this . handlers > ) {
91
91
if ( key in step ) {
92
92
const value = step [ key ] ;
93
- console . log ( 'running handler for ' + key ) ;
94
93
void this . handlers [ key ] ( value as any , step ) ;
95
94
this . stepIndex ++ ;
96
95
return ;
@@ -126,7 +125,7 @@ export class TestScenario {
126
125
delay : async ( value : string , step : IStepDefinition ) => {
127
126
const nanos = parseTime ( value ) ;
128
127
const targetNanos = ( this . client ?. lastNanos ?? 0 ) + nanos ;
129
- this . log ( chalk `delay {yellow " ${ value } " }` ) ;
128
+ this . log ( chalk `delay {yellow ${ value } }` ) ;
130
129
this . eventManager . at ( targetNanos , ( ) => {
131
130
void this . nextStep ( ) ;
132
131
} ) ;
Original file line number Diff line number Diff line change @@ -97,18 +97,19 @@ async function main() {
97
97
98
98
const chips = loadChips ( config . chip ?? [ ] , rootDir ) ;
99
99
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 ) } ` ) ;
102
103
process . exit ( 1 ) ;
103
104
}
104
105
105
106
const eventManager = new EventManager ( ) ;
106
107
const expectEngine = new ExpectEngine ( ) ;
107
108
108
109
let scenario ;
109
- if ( scenarioFile ) {
110
+ if ( resolvedScenarioFile ) {
110
111
scenario = new TestScenario (
111
- YAML . parse ( readFileSync ( scenarioFile , 'utf-8' ) ) ,
112
+ YAML . parse ( readFileSync ( resolvedScenarioFile , 'utf-8' ) ) ,
112
113
eventManager ,
113
114
expectEngine
114
115
) ;
You can’t perform that action at this time.
0 commit comments