diff --git a/test/request.js b/test/request.js index 51647f3..6f8e39e 100644 --- a/test/request.js +++ b/test/request.js @@ -5,7 +5,7 @@ var assert = require('assert') describe('Request', function () { it('should have the correct protocol', function () { var r = new Request() - assert.strictEqual(r.protocol, 'file') + assert.strictEqual(r.protocol + ':', window.location.protocol) assert.strictEqual(r.secure, false) }) it('should have the correct hostname', function () { diff --git a/test/router.js b/test/router.js index 26740a2..ea2108e 100644 --- a/test/router.js +++ b/test/router.js @@ -39,6 +39,7 @@ describe('Router', function () { }) it('BROWSER: should start listening to changes', function (done) { + router.base(window.location.pathname) router.get('/', function (req, res) { assert.strictEqual(req.path, '/', 'Did not match route path correctly') done() @@ -50,6 +51,7 @@ describe('Router', function () { }) it('BROWSER: should process route on popstate', function (done) { + router.base(window.location.pathname) router.get('/', function (req, res) { done() })