const models = require('vn-loopback/server/server').models; describe('department getLeaves()', () => { const ctx = beforeAll.getCtx(); it('should return the department and the childs containing the search value', async() => { let result = await models.Department.getLeaves(ctx, null, 'INFORMATICA'); expect(result.length).toEqual(1); }); });