Add link to root directory

closes #23
This commit is contained in:
Douglas Christopher Wilson
2014-12-03 21:08:54 -05:00
parent 244f8a5541
commit d5a4b93449
3 changed files with 9 additions and 3 deletions
+5
View File
@@ -1,3 +1,8 @@
unreleased
==========
* Add link to root directory
1.5.3 / 2014-12-10
==================
+1 -1
View File
@@ -75,7 +75,7 @@
<body class="directory">
<input id="search" type="text" placeholder="Search" autocomplete="off" />
<div id="wrapper">
<h1>{linked-path}</h1>
<h1><a href="/">~</a>{linked-path}</h1>
{files}
</div>
</body>
+3 -2
View File
@@ -145,8 +145,9 @@ describe('serveIndex(root)', function () {
.expect(200)
.expect('Content-Type', 'text/html; charset=utf-8')
.end(function (err, res) {
if (err) throw err;
var urls = res.text.split(/<a href="([^"]*)"/).filter(function(s, i){ return i%2; });
if (err) done(err);
var body = res.text.split('</h1>')[1];
var urls = body.split(/<a href="([^"]*)"/).filter(function(s, i){ return i%2; });
assert.deepEqual(urls, [
'/%23directory',
'/collect',