Skip to content

Commit

Permalink
fix: update snake case property in tests with correct camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroalves0 committed Jan 15, 2025
1 parent 58b91d2 commit d14da19
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/TodoistApi.comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('TodoistApi comment endpoints', () => {
const getCommentsArgs = { projectId: '12', limit: 10, cursor: '0' }
const requestMock = setupRestClientMock({
results: [DEFAULT_COMMENT],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand All @@ -43,7 +43,7 @@ describe('TodoistApi comment endpoints', () => {
COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT,
COMMENT_WITH_ATTACHMENT_WITH_OPTIONALS_AS_NULL,
]
setupRestClientMock({ results: expectedComments, next_cursor: '123' })
setupRestClientMock({ results: expectedComments, nextCursor: '123' })
const api = getTarget()

const { results: comments, nextCursor } = await api.getComments({ taskId: '12' })
Expand Down
4 changes: 2 additions & 2 deletions src/TodoistApi.labels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('TodoistApi label endpoints', () => {
test('calls get on labels endpoint', async () => {
const requestMock = setupRestClientMock({
results: [DEFAULT_LABEL],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand All @@ -62,7 +62,7 @@ describe('TodoistApi label endpoints', () => {
const labels = [DEFAULT_LABEL]
setupRestClientMock({
results: [DEFAULT_LABEL],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand Down
8 changes: 4 additions & 4 deletions src/TodoistApi.projects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('TodoistApi project endpoints', () => {
test('calls get on projects endpoint', async () => {
const requestMock = setupRestClientMock({
results: [DEFAULT_PROJECT],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand All @@ -68,7 +68,7 @@ describe('TodoistApi project endpoints', () => {

test('returns result from rest client', async () => {
const projects = [DEFAULT_PROJECT, PROJECT_WITH_OPTIONALS_AS_NULL]
setupRestClientMock({ results: projects, next_cursor: '123' })
setupRestClientMock({ results: projects, nextCursor: '123' })
const api = getTarget()

const { results, nextCursor } = await api.getProjects()
Expand Down Expand Up @@ -176,7 +176,7 @@ describe('TodoistApi project endpoints', () => {
const users = [DEFAULT_USER]

test('calls get on expected endpoint', async () => {
const requestMock = setupRestClientMock({ results: users, next_cursor: '123' })
const requestMock = setupRestClientMock({ results: users, nextCursor: '123' })
const api = getTarget()

const args = { limit: 10, cursor: '0' }
Expand All @@ -193,7 +193,7 @@ describe('TodoistApi project endpoints', () => {
})

test('returns result from rest client', async () => {
setupRestClientMock({ results: users, next_cursor: '123' })
setupRestClientMock({ results: users, nextCursor: '123' })
const api = getTarget()

const { results, nextCursor } = await api.getProjectCollaborators(projectId)
Expand Down
4 changes: 2 additions & 2 deletions src/TodoistApi.sections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('TodoistApi section endpoints', () => {
const projectId = '123'
const requestMock = setupRestClientMock({
results: [DEFAULT_SECTION],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand All @@ -59,7 +59,7 @@ describe('TodoistApi section endpoints', () => {

test('returns result from rest client', async () => {
const sections = [DEFAULT_SECTION]
setupRestClientMock({ results: sections, next_cursor: '123' })
setupRestClientMock({ results: sections, nextCursor: '123' })
const api = getTarget()

const { results, nextCursor } = await api.getSections({ projectId: '123' })
Expand Down
4 changes: 2 additions & 2 deletions src/TodoistApi.tasks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe('TodoistApi task endpoints', () => {
test('calls get on expected endpoint with args', async () => {
const requestMock = setupRestClientMock({
results: [DEFAULT_TASK, TASK_WITH_OPTIONALS_AS_NULL],
next_cursor: '123',
nextCursor: '123',
})
const api = getTarget()

Expand All @@ -277,7 +277,7 @@ describe('TodoistApi task endpoints', () => {

test('returns result from rest client', async () => {
const tasks = [DEFAULT_TASK]
setupRestClientMock({ results: tasks, next_cursor: '123' })
setupRestClientMock({ results: tasks, nextCursor: '123' })
const api = getTarget()

const { results, nextCursor } = await api.getTasks(DEFAULT_GET_TASKS_ARGS)
Expand Down

0 comments on commit d14da19

Please sign in to comment.