Skip to content

Commit

Permalink
Fixed nightwatchjs#438 - an issue with passing a numeric tag
Browse files Browse the repository at this point in the history
  • Loading branch information
beatfactor committed May 14, 2015
1 parent c4289e6 commit c040ccd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/runner/filematcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = {
checkModuleTags: function (test, tags) {
var testTags = test['@tags'] || test.tags;

if (typeof tags === 'string') {
if (!Array.isArray(tags)) {
tags = [tags];
}

Expand Down
2 changes: 0 additions & 2 deletions lib/runner/testcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ TestCase.prototype.run = function () {
};

self.suite.client.once('complete', function(results, errors) {
console.log('COMPLETE', results)
self.results = results;
self.errors = errors;
if (self.suite.client.options.start_session) {
Expand Down Expand Up @@ -105,7 +104,6 @@ TestCase.prototype.run = function () {
return deferredNext.promise;
})
.then(function onSuccess(response) {
console.log('onSuccess', response)
self.results = response.results;
self.errors = response.errors;

Expand Down
11 changes: 11 additions & 0 deletions tests/src/runner/testFileMatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,15 @@ module.exports = {
test.ok(matched === true);
test.done();
},

'tag: test matching numeric tags single': function (test) {
var tags = 101;
var testModule = {
tags: ['101']
};

var matched = matcher.tags.checkModuleTags(testModule, tags);
test.ok(matched === true);
test.done();
}
};

0 comments on commit c040ccd

Please sign in to comment.