const app = require('../../../../../client/server/server'); const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors; describe('Client activeSalesPerson', () => { it('should call the activeSalesPerson() method with limit of 1', done => { let filter = { limit: 1 }; let callback = (error, result) => { if (error) return catchErrors(done)(error); expect(result.length).toEqual(1); done(); }; app.models.Client.activeSalesPerson(filter, callback); }); it('should call the activeSalesPerson() method with no limit and receive all 3 salesPersons', done => { let filter = { }; let callback = (error, result) => { if (error) return catchErrors(done)(error); expect(result.length).toEqual(3); done(); }; app.models.Client.activeSalesPerson(filter, callback); }); });