const {models} = require('vn-loopback/server/server'); describe('itemShelving getAlternative()', () => { beforeAll(async() => { ctx = { req: { headers: {origin: 'http://localhost'}, } }; }); it('should return a list of items without alternatives', async() => { const shelvingFk = 'HEJ'; const itemShelvings = await models.ItemShelving.getAlternative(shelvingFk); expect(itemShelvings[0].shelvings.length).toEqual(0); }); it('should return an empty list', async() => { const shelvingFk = 'ZZP'; const itemShelvings = await models.ItemShelving.getAlternative(shelvingFk); expect(itemShelvings.length).toEqual(0); }); });