Skip to content

Commit

Permalink
Add total field in getTasks response (#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
bidoubiwa authored Jul 11, 2023
1 parent 7c395ed commit 13846f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ type CursorResults<T> = {
limit: number
from: number
next: number
total: number
}

export type TasksResults = CursorResults<Task>
Expand Down
1 change: 1 addition & 0 deletions tests/task.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ describe.each([{ permission: 'Master' }, { permission: 'Admin' }])(
const tasks = await client.getTasks()

expect(tasks.results).toBeInstanceOf(Array)
expect(tasks.total).toBeDefined()
expect(tasks.results[0].uid).toEqual(enqueuedTask.taskUid)
})

Expand Down

0 comments on commit 13846f0

Please sign in to comment.