const app = require('vn-loopback/server/server'); describe('workerTimeControl addAutoTime()', () => { it('should return an undefined value', async() => { let ctx = {req: {accessToken: {userId: 9}}}; let data = {'timed': new Date()}; let result = await app.models.WorkerTimeControl.addAutoTime(ctx, data); expect(result).toBeUndefined(); }); });