Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Log instead of error on unknown tag #1290

Merged
merged 1 commit into from
Dec 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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