test('instantiates in test environment', t => { const api = Neutrino({ env: { NODE_ENV: 'test' } }); api.use(mw()); t.notThrows(() => api.config.toConfig()); });
test('instantiates with options', t => { const api = Neutrino(); api.use(mw(), options); t.notThrows(() => api.config.toConfig()); });
test('exposes lint command', t => { const api = Neutrino(); api.use(mw()); t.is(typeof api.commands.lint, 'function'); });
test('uses preset', t => { const api = Neutrino(); t.notThrows(() => api.use(mw())); });
test('uses preset in test environment', t => { const api = Neutrino({ env: { NODE_ENV: 'test' } }); t.notThrows(() => api.use(mw())); });
test('uses with options', t => { const api = Neutrino(); t.notThrows(() => api.use(mw(), options)); });
test('uses middleware', t => { const api = Neutrino(); t.notThrows(() => api.use(mw())); });
test('exposes eslintrc config', t => { const api = Neutrino(); t.is(typeof api.call('eslintrc', [mw()]), 'object'); });
const { Neutrino } = require('neutrino'); module.exports = Neutrino({ root: __dirname }) .use('.neutrinorc.js') .call('eslintrc');