const getMana = require('../getMana'); const model = { remoteMethod: () => {} }; let Loopback = require('../../../test-helpers/loopback'); Loopback.init(model); Loopback.rawSql(model); getMana(model); describe('client getMana()', () => { it('should call the getMana method', done => { model.getMana(101) .then(response => { expect(response.mana).toEqual(30.02); done(); }); }); });