const app = require(`${servicesDir}/ticket/server/server`); describe('ticket deleted()', () => { let ticket; afterAll(async() => { ticket.isDeleted = 0; await app.models.Ticket.upsert(ticket); }); it('YOU should work this out', async() => { ticket = await app.models.Ticket.findOne({where: {id: 1}}); expect(ticket.isDeleted).toEqual(false); await app.models.Ticket.deleted({id: 1}); let deletedTicket = await app.models.Ticket.findOne({where: {id: 1}, fields: ['isDeleted']}); expect(deletedTicket.isDeleted).toEqual(true); }); });