From 0a835765084670ed78f3fcff1860525bbfd17399 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 19 Feb 2017 22:01:43 +0000 Subject: [PATCH] Use path --- tests/server.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/server.test.ts b/tests/server.test.ts index ec8946b..0aef94c 100644 --- a/tests/server.test.ts +++ b/tests/server.test.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import { runServer } from './helpers'; import * as fs from 'fs'; +import * as path from 'path'; describe('Server', function () { @@ -39,7 +40,7 @@ describe('Server', function () { }); describe('index route', function () { - const body = fs.readFileSync(__dirname + '/../site/index.html').toString(); + const body = fs.readFileSync(path.join(__dirname, '..', 'site', 'index.html')).toString(); ['', '/', '/index.html'].forEach(function (path : string) { it('should render ' + path, function (done) {