Skip to content

Commit

Permalink
Include list of referring pages when failing tests on HTTP 200 check
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Apr 11, 2015
1 parent 7de2c64 commit 4d507a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ module.exports = function (options) {
ok: true,
name: 'URI should have no redirects - ' + url,
operator: 'noRedirects',
expected: [200, url].join(' ')
expected: [200, url].join(' '),
at: _.uniq(relations.map(function (relation) {
return relation.from.urlOrDescription.replace(/#.*$/, '');
})).join('\n ')
};

if (redirects.length) {
Expand All @@ -53,9 +56,6 @@ module.exports = function (options) {

report.ok = false;
report.actual = logLine;
report.at = _.uniq(relations.map(function (relation) {
return relation.from.urlOrDescription.replace(/#.*$/, '');
})).join('\n ');
} else {
report.actual = [status, url].join(' ');

Expand Down

0 comments on commit 4d507a0

Please sign in to comment.