Skip to content

Commit

Permalink
update task e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
edolix committed Jun 1, 2022
1 parent 844ff94 commit 5886c40
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/e2e-realtime-api/src/task.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ const handler = () => {

client.on('task.received', (payload) => {
if (payload.id === firstPayload.id && payload.item === 'first') {
return counter++
counter++
} else if (payload.id === lastPayload.id && payload.item === 'last') {
return counter++
counter++
} else {
console.error('Invalid payload on `task.received`', payload)
return reject(4)
}

if (counter === 2) {
return resolve(0)
}
console.error('Invalid payload on `task.received`', payload)
return reject(4)
})

await Task.send({
Expand Down

0 comments on commit 5886c40

Please sign in to comment.