diff --git a/src/route.js b/src/route.js index bfb618e3..9bc1f6ce 100644 --- a/src/route.js +++ b/src/route.js @@ -8,6 +8,7 @@ export const plugin = { method: 'GET', path: '/html', handler: (request, h) => renderThroughReactRouter(request, h, { + render: options.render, routes: options.routes, respond: options.respond, Root: options.Root, diff --git a/test/unit/route-test.js b/test/unit/route-test.js index 348b26c0..24699cf6 100644 --- a/test/unit/route-test.js +++ b/test/unit/route-test.js @@ -20,6 +20,7 @@ suite('route', () => { }); test('that the request for html is handled', async () => { + const render = () => undefined; const route = sinon.stub(); const respond = sinon.spy(); const routes = sinon.spy(); @@ -32,7 +33,7 @@ suite('route', () => { const configureStore = sinon.stub(); configureStore.withArgs({session: {auth: auth.credentials}, server}).returns(store); - await plugin.register(server, {respond, routes, Root, configureStore}); + await plugin.register(server, {render, respond, routes, Root, configureStore}); assert.calledWith(route, sinon.match({ method: 'GET', @@ -41,6 +42,6 @@ suite('route', () => { route.yieldTo('handler', request, reply); - assert.calledWith(routerWrapper.default, request, reply, {routes, respond, Root, store}); + assert.calledWith(routerWrapper.default, request, reply, {render, routes, respond, Root, store}); }); });