Skip to content

Commit

Permalink
Upgrade urltools to 0.4.2. Fixes #169
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Jul 28, 2021
1 parent 58e4a95 commit 5e5d0a8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"hreftypes": "^1.0.1",
"pretty-bytes": "^5.2.0",
"request": "^2.88.0",
"urltools": "^0.4.1",
"urltools": "^0.4.2",
"yargs": "^16.0.3"
},
"devDependencies": {
Expand Down
22 changes: 22 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3004,4 +3004,26 @@ describe('hyperlink', function () {
todo: 0,
});
});

it('should handle special characters in paths. Regression test https://github.com/Munter/hyperlink/issues/169', async () => {
const t = new TapRender();
// t.pipe(process.stdout);
sinon.spy(t, 'push');
await hyperlink(
{
recursive: false,
root: pathModule.resolve(__dirname, '..', 'testdata', '@scopename'),
inputUrls: ['index.html'],
},
t
);

expect(t.close(), 'to satisfy', {
count: 2,
pass: 2,
fail: 0,
skip: 0,
todo: 0,
});
});
});
1 change: 1 addition & 0 deletions testdata/@scopename/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="page.html">page link</a>
1 change: 1 addition & 0 deletions testdata/@scopename/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="/">index</a>

0 comments on commit 5e5d0a8

Please sign in to comment.