import app from '../../src/app' describe('CRUD operation on \'License\' model', () => { const model = app.service('license').Model it('Create', done => { model.create({ name: 'test', text: 'text' }).then(res => { done() }).catch(done) }) it('Read', done => { model.findOne({ where: { name: 'test' } }).then(res => { done() }).catch(done) }) it('Update', done => { model.update( { text: 'text2' }, { where: { name: 'test' } } ).then(res => { done() }).catch(done) }) it('Delete', done => { model.destroy({ where: { name: 'test' } }).then(res => { done() }).catch(done) }) })