diff --git a/README.md b/README.md index a1ec8b9..852b22f 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,14 @@ when this option is specified, and all loading becomes explicit. Files under directories named "support" are always loaded first. +#### support +Type: `String` + +Default: `''` + +Support files let you setup the environment in which steps will be run. If you are using steps option then you have to use support option as well (hooks etc.). + + #### tags Type: `String` diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index 45e37a7..a326f77 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -9,6 +9,7 @@ module.exports = function (grunt) { var options = this.options(); var steps = options.steps; + var support = options.support; var tags = options.tags; var format = options.format; var modulePath = options.modulePath; @@ -52,6 +53,11 @@ module.exports = function (grunt) { execOptions.push(steps); } + if (! _.isEmpty(support)) { + execOptions.push('-r'); + execOptions.push(support); + } + if (! _.isEmpty(tags)) { execOptions.push('-t'); execOptions.push(tags);