const models = require('vn-loopback/server/server').models; describe('NotificationSubscription getList()', () => { it('should return a list of available and active notifications of a user', async() => { const {active, available} = await models.NotificationSubscription.getList(9); const notifications = await models.Notification.find({}); const totalAvailable = notifications.length - active.length; expect(active.length).toEqual(2); expect(available.length).toEqual(totalAvailable); }); });