const getAverageInvoiced = require('../getAverageInvoiced'); const {rawSql} = require('../../../test-helpers/rawSql'); const model = { remoteMethod: () => {} }; rawSql(model); getAverageInvoiced(model); describe('client getAverageInvoiced()', () => { it('should call the getAverageInvoiced method', done => { model.getAverageInvoiced(101) .then(response => { expect(response.invoiced).toEqual(0); done(); }); }); });