before(() => { chailint(chai, util) app = feathers() app.configure(plugin()) })
test('Adds .findOne() service method', async () => { const app = feathers() .configure(findOne()) .use('/messages', memory()) const service = app.service('messages') const messages = await service.create([ {text: 'Message 1'}, {text: 'Message 2'} ]) const message = await service.findOne() expect(message).toEqual(messages[0]) })
describe('krawler', () => { let app before(() => { chailint(chai, util) app = feathers() }) it('is CommonJS compatible', () => { expect(typeof plugin).to.equal('function') expect(typeof plugin.stores).to.equal('function') expect(typeof plugin.stores.Service).to.equal('function') expect(typeof plugin.tasks).to.equal('function') expect(typeof plugin.tasks.Service).to.equal('function') expect(typeof plugin.jobs).to.equal('function') expect(typeof plugin.jobs.Service).to.equal('function') }) it('registers the plugin', () => { app.configure(plugin) }) })
before(() => { chailint(chai, util) app = express(feathers()) app.configure(plugin()) server = app.listen(3030) })
export async function createApp (job, options = {}) { debug('Initializing krawler application') app = express(feathers())
function start() { const app = express(feathers());
app = express(feathers()) app.configure(plugin()) server = app.listen(3030)
app = express(feathers()) app.configure(plugin()) server = app.listen(3030)
before(() => { chailint(chai, util) app = express(feathers()) app.configure(plugin()) server = app.listen(3030) })