From 24a29ba2f4732d517cb1de1ec99076394e874d86 Mon Sep 17 00:00:00 2001 From: Benson Perry Date: Fri, 20 Sep 2013 16:14:20 -0400 Subject: [PATCH] logical and --- README.md | 7 ++++++- tasks/cucumber-js-task.js | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1ec8b9..c0b0691 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ when this option is specified, and all loading becomes explicit. Files under directories named "support" are always loaded first. #### tags -Type: `String` +Type: `String` or `Array` Default: `''` @@ -58,6 +58,11 @@ this represents boolean NOT. Example: by a comma, which represents logical OR. Example: `tags: '@dev,@wip'` +To represent a logcal AND, use an array. +This is useful if you want to skip certain features +and run other specific (tagged) features. Example: +`tags: ['~@wip', '@dev']` + #### format Type: `String` diff --git a/tasks/cucumber-js-task.js b/tasks/cucumber-js-task.js index 45e37a7..28ac904 100644 --- a/tasks/cucumber-js-task.js +++ b/tasks/cucumber-js-task.js @@ -53,8 +53,13 @@ module.exports = function (grunt) { } if (! _.isEmpty(tags)) { - execOptions.push('-t'); - execOptions.push(tags); + if (typeof tags == "string") { + tags = [tags]; + } + for (var i=0; i < tags.length; i++) { + execOptions.push('-t'); + execOptions.push(tags[i]); + } } if (! _.isEmpty(format)) {