const models = require('vn-loopback/server/server').models; describe('ticket listPackaging()', () => { it('should return the packaging', async() => { const tx = await models.Packaging.beginTransaction({}); try { const options = {transaction: tx}; const filter = {where: {packagingFk: 1}}; const [response] = await models.Packaging.listPackaging(filter, options); expect(response.name).toEqual('Container ammo box 100cm'); await tx.rollback(); } catch (e) { await tx.rollback(); throw e; } }); });