Skip to content

Commit

Permalink
fix: Log instead of error on unknown tag (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnoC authored and WilcoFiers committed Dec 30, 2018
1 parent 88017be commit f82d773
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions lib/core/base/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,7 @@ Audit.prototype.normalizeOptions = function(options) {
}, only.values);

if (unmatchedTags.length !== 0) {
throw new Error(
'Could not find tags `' + unmatchedTags.join('`, `') + '`'
);
axe.log('Could not find tags `' + unmatchedTags.join('`, `') + '`');
}
} else {
throw new Error(`Unknown runOnly type '${only.type}'`);
Expand Down
4 changes: 2 additions & 2 deletions test/core/base/audit.js
Original file line number Diff line number Diff line change
Expand Up @@ -1273,8 +1273,8 @@ describe('Audit', function() {
});
});

it('throws an error when option.runOnly has an unknown tag', function() {
assert.throws(function() {
it("doesn't throw an error when option.runOnly has an unknown tag", function() {
assert.doesNotThrow(function() {
a.normalizeOptions({
runOnly: {
type: 'tags',
Expand Down

0 comments on commit f82d773

Please sign in to comment.