From d14da19fc8d054add8dec0972c24c601dccb4e9a Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 15 Jan 2025 16:36:37 +0100 Subject: [PATCH] fix: update snake case property in tests with correct camel case --- src/TodoistApi.comments.test.ts | 4 ++-- src/TodoistApi.labels.test.ts | 4 ++-- src/TodoistApi.projects.test.ts | 8 ++++---- src/TodoistApi.sections.test.ts | 4 ++-- src/TodoistApi.tasks.test.ts | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/TodoistApi.comments.test.ts b/src/TodoistApi.comments.test.ts index 9ea0e24..8263ada 100644 --- a/src/TodoistApi.comments.test.ts +++ b/src/TodoistApi.comments.test.ts @@ -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() @@ -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' }) diff --git a/src/TodoistApi.labels.test.ts b/src/TodoistApi.labels.test.ts index 895d26f..61d0617 100644 --- a/src/TodoistApi.labels.test.ts +++ b/src/TodoistApi.labels.test.ts @@ -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() @@ -62,7 +62,7 @@ describe('TodoistApi label endpoints', () => { const labels = [DEFAULT_LABEL] setupRestClientMock({ results: [DEFAULT_LABEL], - next_cursor: '123', + nextCursor: '123', }) const api = getTarget() diff --git a/src/TodoistApi.projects.test.ts b/src/TodoistApi.projects.test.ts index f6d401f..5e0a61c 100644 --- a/src/TodoistApi.projects.test.ts +++ b/src/TodoistApi.projects.test.ts @@ -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() @@ -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() @@ -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' } @@ -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) diff --git a/src/TodoistApi.sections.test.ts b/src/TodoistApi.sections.test.ts index 1ea2713..0068ee1 100644 --- a/src/TodoistApi.sections.test.ts +++ b/src/TodoistApi.sections.test.ts @@ -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() @@ -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' }) diff --git a/src/TodoistApi.tasks.test.ts b/src/TodoistApi.tasks.test.ts index 6246954..9c3cbbe 100644 --- a/src/TodoistApi.tasks.test.ts +++ b/src/TodoistApi.tasks.test.ts @@ -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() @@ -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)