Skip to content

Commit 3a9681f

Browse files
committed
fixed failing test
1 parent 0b91978 commit 3a9681f

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

test.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function initServer(opt, done) {
5656
options: opt
5757
}, function (err) {
5858
expect(err).to.not.exist;
59-
});
59+
});
6060
server.start(done);
6161
return server;
6262
}
@@ -72,10 +72,12 @@ describe('hapi-prerender', function () {
7272

7373
var server = new Hapi.Server();
7474

75+
server.connection({ host: '127.0.0.1', port: 8888 });
76+
7577
server.register(PrerenderPlugin, function (err) {
7678
expect(err).to.not.exist;
7779
done();
78-
});
80+
});
7981

8082
});
8183

@@ -198,7 +200,7 @@ describe('hapi-prerender', function () {
198200
});
199201

200202
it('should return a prerendered gzipped response', function (done) {
201-
203+
202204
Zlib.gzip(new Buffer('<html></html>', 'utf-8'), function (err, zipped) {
203205
Nock('http://service.prerender.io')
204206
.get('/http://127.0.0.1:8888/foo')
@@ -240,7 +242,7 @@ describe('hapi-prerender', function () {
240242
});
241243

242244
it('should include X-Prerender-Token header in request', function (done) {
243-
245+
244246
Nock('http://service.prerender.io')
245247
.matchHeader('X-Prerender-Token', 'MY_TOKEN')
246248
.get('/http://127.0.0.1:8888/?_escaped_fragment_=')
@@ -274,7 +276,7 @@ describe('hapi-prerender', function () {
274276
});
275277

276278
it('should send request to custom service', function (done) {
277-
279+
278280
Nock('http://127.0.0.1:3000')
279281
.get('/http://127.0.0.1:8888/?_escaped_fragment_=')
280282
.reply(301, '<html><body>prerendered!</body></html>');
@@ -311,7 +313,7 @@ describe('hapi-prerender', function () {
311313
});
312314

313315
it('should send request to given serviceUrl including token', function (done) {
314-
316+
315317
Nock('http://foo')
316318
.matchHeader('X-Prerender-Token', 'MY_TOKEN')
317319
.get('/http://127.0.0.1:8888/?_escaped_fragment_=')
@@ -385,19 +387,19 @@ describe('hapi-prerender', function () {
385387
});
386388

387389
});
388-
390+
389391
});
390392

391393
describe('with whitelist option', function () {
392-
394+
393395
it('should ignore if url is not whitelisted');
394396

395397
it('should return a prerendered response if url is whitelisted');
396398

397399
});
398400

399401
describe('with blacklist option', function () {
400-
402+
401403
it('should ignore if the url is blacklisted');
402404

403405
it('should return a prerendered response if url is not blacklisted');
@@ -409,4 +411,3 @@ describe('hapi-prerender', function () {
409411
});
410412

411413
});
412-

0 commit comments

Comments
 (0)