Skip to content

Commit

Permalink
Fix test for improved html debugging output
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Feb 8, 2017
1 parent df9c887 commit 4a76f7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/relationDebugDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = function relationDebugDescription(relation) {
var details;

if (asset.type === 'Html') {
details = relation.node.outerHTML.replace(relation.node.innerHTML, '...');
details = relation.node.outerHTML.split('>' + relation.node.innerHTML + '<').join('>...<');
}

if (asset.url.indexOf('file:') === 0) {
Expand Down
4 changes: 2 additions & 2 deletions test/relationDebugDescription-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('relationDebugDescription', function () {
var result = relationDebugDescription(relation);


expect(result, 'to end with', 'index.html:8:14');
expect(result, 'to end with', 'index.html:8:14 <a href="foo.html">...</a>');
});

it('should append line and char offsets to non-file-url assets', function () {
Expand All @@ -50,6 +50,6 @@ describe('relationDebugDescription', function () {
var result = relationDebugDescription(relation);


expect(result, 'to end with', 'index.html (8:14)');
expect(result, 'to end with', 'index.html (8:14) <a href="foo.html">...</a>');
});
});

0 comments on commit 4a76f7b

Please sign in to comment.