it('fallback support for `next` from gasket.config', async () => { gasket.config.next = { customConfig: true }; result = await createConfig(gasket); assume(result).has.property('customConfig', true); });
it('adds webpack hook', async () => { result = await createConfig(gasket); assume(result).has.property('webpack'); assume(result.webpack).is.a('function'); });
it('wraps existing nextConfig webpack hook', async () => { const webpackStub = stub(); gasket.config.nextConfig = { webpack: webpackStub }; result = await createConfig(gasket); assume(result).has.property('webpack'); result.webpack(); assume(webpackStub).is.called(); });
it('executes the `express` lifecycle', async function () { await plugin.hooks.createServers(gasket, {}); assume(gasket.exec).has.been.calledWith('express', app); });
it('disables x-powered-by header', async () => { result = await createConfig(gasket); assume(result).has.property('poweredByHeader', false); });
it('includes `nextConfig` from gasket.config', async () => { gasket.config.nextConfig = { customConfig: true }; result = await createConfig(gasket); assume(result).has.property('customConfig', true); });
it('executes the `middleware` lifecycle', async function () { await plugin.hooks.createServers(gasket, {}); assume(gasket.exec).has.been.calledWith('middleware', app); });