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[0].name).toEqual('Container ammo box 1m'); await tx.rollback(); } catch (e) { await tx.rollback(); throw e; } }); });