const models = require('vn-loopback/server/server').models; describe('ticket getCollection()', () => { it('should return a list of collections', async() => { let ctx = {req: {accessToken: {userId: 1106}}}; let response = await models.Collection.getCollection(ctx); expect(response.length).toBeGreaterThan(0); expect(response[0].collectionFk).toEqual(1); }); });