const app = require('../../../../../client/server/server'); const catchErrors = require('../../../../../../services/utils/jasmineHelpers').catchErrors; describe('Client card', () => { it('should call the card() method to receive a formated card of Bruce Wayne', done => { let id = 101; let callback = (error, result) => { if (error) return catchErrors(done)(error); expect(result).toEqual(jasmine.objectContaining({ id: 101, name: 'Bruce Wayne' })); done(); }; app.models.Client.card(id, callback); }); });