test(task/combineEvents): test id, start and end properties

This commit is contained in:
Julien Fontanet
2023-06-05 15:22:44 +02:00
parent 41bb16ca30
commit 07142d0410

View File

@@ -35,7 +35,8 @@ describe('makeOnProgress()', function () {
await task.run(async () => {
assert.equal(events[0], 'onRootTaskStart')
assert.equal(events[1], 'onTaskUpdate')
assert.equal(log.name, 'task')
assert.equal(log.id, task.id)
assert(Math.abs(log.start - Date.now()) < 10)
Task.set('progress', 0)
assert.equal(events[2], 'onTaskUpdate')
@@ -62,6 +63,7 @@ describe('makeOnProgress()', function () {
})
assert.equal(events[8], 'onRootTaskEnd')
assert.equal(events[9], 'onTaskUpdate')
assert(Math.abs(log.end - Date.now()) < 10)
assert.equal(log.status, 'success')
})
})