k6-cucumber-steps 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,10 +104,32 @@ program
104
104
 
105
105
  // Collect options to pass as env vars
106
106
  const extraEnv = {
107
- SAVE_K6_SCRIPT: argv.saveK6Script === true || process.env.SAVE_K6_SCRIPT === "true" || cucumberConfig.saveK6Script === true ? "true" : "false",
108
- K6_CUCUMBER_OVERWRITE: argv.overwrite === true || process.env.K6_CUCUMBER_OVERWRITE === "true" || cucumberConfig.overwrite === true ? "true" : "false",
109
- CLEAN_REPORTS: argv.cleanReports === true || argv.clean === true || process.env.CLEAN_REPORTS === "true" || cucumberConfig.cleanReports === true ? "true" : "false",
110
- K6_CUCUMBER_REPORTER: argv.reporter === true || process.env.K6_CUCUMBER_REPORTER === "true" || cucumberConfig.reporter === true ? "true" : "false",
107
+ // Priority: cucumberConfig > CLI > process.env
108
+ SAVE_K6_SCRIPT:
109
+ cucumberConfig.saveK6Script === true ||
110
+ argv.saveK6Script === true ||
111
+ process.env.SAVE_K6_SCRIPT === "true"
112
+ ? "true"
113
+ : "false",
114
+ K6_CUCUMBER_OVERWRITE:
115
+ cucumberConfig.overwrite === true ||
116
+ argv.overwrite === true ||
117
+ process.env.K6_CUCUMBER_OVERWRITE === "true"
118
+ ? "true"
119
+ : "false",
120
+ CLEAN_REPORTS:
121
+ cucumberConfig.cleanReports === true ||
122
+ argv.cleanReports === true ||
123
+ argv.clean === true ||
124
+ process.env.CLEAN_REPORTS === "true"
125
+ ? "true"
126
+ : "false",
127
+ K6_CUCUMBER_REPORTER:
128
+ cucumberConfig.reporter === true ||
129
+ argv.reporter === true ||
130
+ process.env.K6_CUCUMBER_REPORTER === "true"
131
+ ? "true"
132
+ : "false",
111
133
  };
112
134
 
113
135
  // Now print environment variables (after extraEnv is defined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k6-cucumber-steps",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "repository": {