Skip to content

Commit 4fd26ed

Browse files
author
John Doherty
authored
Merge pull request #87 from DallasEpperson/worldParameters
Added support for cucumber-js world-parameters <JSON>
2 parents d29cd32 + 9bf131a commit 4fd26ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ program
5353
.option('-f, --featureFiles <paths>', 'comma-separated list of feature files to run')
5454
.option('-x, --timeOut <n>', 'steps definition timeout in milliseconds. defaults to ' + config.timeout, coerceInt, config.timeout)
5555
.option('-n, --noScreenshot [optional]', 'disable auto capturing of screenshots when an error is encountered')
56+
.option('-w, --worldParameters <JSON>', 'JSON object to pass to cucumber-js world constructor. defaults to empty', config.worldParameters)
5657
.parse(process.argv);
5758

5859
program.on('--help', function () {
@@ -126,6 +127,11 @@ if (program.tags) {
126127
});
127128
}
128129

130+
if (program.worldParameters){
131+
process.argv.push('--world-parameters');
132+
process.argv.push(program.worldParameters);
133+
}
134+
129135
// add strict option (fail if there are any undefined or pending steps)
130136
process.argv.push('-S');
131137

0 commit comments

Comments
 (0)