const app = require(`${servicesDir}/ticket/server/server`); describe('ticket getTotal()', () => { it('should call the getTotal method and return the response', done => { app.models.Ticket.getTotal(1) .then(response => { expect(response).toEqual(325.05); done(); }); }); it(`should call the getTotal method and return zero if doesn't have lines`, done => { app.models.Ticket.getTotal(13) .then(response => { expect(response).toEqual(0); done(); }); }); });