Skip to content

Commit

Permalink
Merge branch 'master' into cssAndScripts
Browse files Browse the repository at this point in the history
  • Loading branch information
orthagonal committed May 8, 2018
2 parents 14d302f + f7c7bb2 commit 8fcfde7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,29 @@ tap.test('be able to pass in css and js links', async(t) => {
await server.stop();
t.end();
});


tap.test('will not interfere with non-200 results', async(t) => {
const server = await new Hapi.Server({ port: 8080 });
server.route({
method: 'get',
path: '/path1',
config: {
plugins: {
'hapi-transform-table': {}
}
},
handler(request, h) {
return h.response('hello there').code(204);
}
});
await server.register({ plugin, options: { excludeSubArrays: true } });
await server.start();
const tableResponse = await server.inject({
method: 'get',
url: '/path1.html'
});
t.equal(tableResponse.statusCode, 204, 'returns HTTP 204');
await server.stop();
t.end();
});

0 comments on commit 8fcfde7

Please sign in to comment.