Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,272 changes: 4,001 additions & 2,271 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@doist/eslint-config": "11.1.0",
"@doist/prettier-config": "4.0.0",
"@types/jest": "29.4.0",
"@types/jest": "30.0.0",
"@types/uuid": "9.0.7",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
Expand All @@ -46,12 +46,12 @@
"eslint-plugin-import": "2.27.5",
"eslint-plugin-prettier": "5.1.3",
"husky": "8.0.3",
"jest": "29.5.0",
"jest": "30.1.1",
"lint-staged": "13.1.4",
"npm-run-all2": "5.0.0",
"prettier": "3.3.2",
"rimraf": "3.0.2",
"ts-jest": "29.0.5",
"ts-jest": "29.4.1",
"ts-node": "10.9.1",
"type-fest": "^4.12.0",
"typescript": "5.3.2"
Expand Down
20 changes: 10 additions & 10 deletions src/TodoistApi.comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ describe('TodoistApi comment endpoints', () => {

await api.getComments(getCommentsArgs)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
ENDPOINT_REST_COMMENTS,
Expand Down Expand Up @@ -71,8 +71,8 @@ describe('TodoistApi comment endpoints', () => {

await api.getComment(commentId)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
`${ENDPOINT_REST_COMMENTS}/${commentId}`,
Expand Down Expand Up @@ -102,8 +102,8 @@ describe('TodoistApi comment endpoints', () => {

await api.addComment(addCommentArgs, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_COMMENTS,
Expand Down Expand Up @@ -135,8 +135,8 @@ describe('TodoistApi comment endpoints', () => {

await api.updateComment(taskId, updateCommentArgs, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_COMMENTS}/${taskId}`,
Expand Down Expand Up @@ -166,8 +166,8 @@ describe('TodoistApi comment endpoints', () => {

await api.deleteComment(taskId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'DELETE',
getSyncBaseUri(),
`${ENDPOINT_REST_COMMENTS}/${taskId}`,
Expand Down
32 changes: 16 additions & 16 deletions src/TodoistApi.labels.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ describe('TodoistApi label endpoints', () => {

await api.getLabel(labelId)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
`${ENDPOINT_REST_LABELS}/${labelId}`,
Expand Down Expand Up @@ -51,8 +51,8 @@ describe('TodoistApi label endpoints', () => {

await api.getLabels({ limit: 10, cursor: '0' })

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
ENDPOINT_REST_LABELS,
Expand Down Expand Up @@ -90,8 +90,8 @@ describe('TodoistApi label endpoints', () => {

await api.addLabel(DEFAULT_ADD_LABEL_ARGS, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_LABELS,
Expand Down Expand Up @@ -123,8 +123,8 @@ describe('TodoistApi label endpoints', () => {

await api.updateLabel(labelId, DEFAULT_UPDATE_LABEL_ARGS, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_LABELS}/${labelId}`,
Expand Down Expand Up @@ -153,8 +153,8 @@ describe('TodoistApi label endpoints', () => {

await api.deleteLabel(labelId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'DELETE',
getSyncBaseUri(),
`${ENDPOINT_REST_LABELS}/${labelId}`,
Expand Down Expand Up @@ -186,8 +186,8 @@ describe('TodoistApi label endpoints', () => {
cursor: 'abc',
})

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
ENDPOINT_REST_LABELS_SHARED,
Expand Down Expand Up @@ -215,8 +215,8 @@ describe('TodoistApi label endpoints', () => {

await api.renameSharedLabel(args)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_LABELS_SHARED_RENAME,
Expand Down Expand Up @@ -244,8 +244,8 @@ describe('TodoistApi label endpoints', () => {

await api.removeSharedLabel(args)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_LABELS_SHARED_REMOVE,
Expand Down
2 changes: 1 addition & 1 deletion src/TodoistApi.moveTasks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('TodoistApi moveTasks', () => {
const result = await api.moveTasks(TASK_IDS, { projectId: '999' }, DEFAULT_REQUEST_ID)

// Verify API call structure
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_SYNC,
Expand Down
32 changes: 16 additions & 16 deletions src/TodoistApi.projects.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ describe('TodoistApi project endpoints', () => {

await api.getProject(projectId)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}`,
Expand Down Expand Up @@ -60,8 +60,8 @@ describe('TodoistApi project endpoints', () => {
const args = { limit: 10, cursor: '0' }
await api.getProjects(args)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
ENDPOINT_REST_PROJECTS,
Expand Down Expand Up @@ -93,8 +93,8 @@ describe('TodoistApi project endpoints', () => {

await api.addProject(DEFAULT_ADD_PROJECT_ARGS, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_PROJECTS,
Expand Down Expand Up @@ -129,8 +129,8 @@ describe('TodoistApi project endpoints', () => {

await api.updateProject(projectId, updateArgs, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}`,
Expand Down Expand Up @@ -163,8 +163,8 @@ describe('TodoistApi project endpoints', () => {

await api.deleteProject(projectId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'DELETE',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}`,
Expand Down Expand Up @@ -195,8 +195,8 @@ describe('TodoistApi project endpoints', () => {
const args = { limit: 10, cursor: '0' }
await api.getProjectCollaborators(projectId, args)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}/${ENDPOINT_REST_PROJECT_COLLABORATORS}`,
Expand Down Expand Up @@ -224,8 +224,8 @@ describe('TodoistApi project endpoints', () => {

await api.archiveProject(projectId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}/${PROJECT_ARCHIVE}`,
Expand All @@ -252,8 +252,8 @@ describe('TodoistApi project endpoints', () => {

await api.unarchiveProject(projectId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_PROJECTS}/${projectId}/${PROJECT_UNARCHIVE}`,
Expand Down
20 changes: 10 additions & 10 deletions src/TodoistApi.sections.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('TodoistApi section endpoints', () => {

await api.getSection(sectionId)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
`${ENDPOINT_REST_SECTIONS}/${sectionId}`,
Expand Down Expand Up @@ -47,8 +47,8 @@ describe('TodoistApi section endpoints', () => {
const args = { projectId, limit: 10, cursor: '0' }
await api.getSections(args)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'GET',
getSyncBaseUri(),
ENDPOINT_REST_SECTIONS,
Expand Down Expand Up @@ -81,8 +81,8 @@ describe('TodoistApi section endpoints', () => {

await api.addSection(DEFAULT_ADD_SECTION_ARGS, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
ENDPOINT_REST_SECTIONS,
Expand Down Expand Up @@ -112,8 +112,8 @@ describe('TodoistApi section endpoints', () => {

await api.updateSection(sectionId, DEFAULT_UPDATE_SECTION_ARGS, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'POST',
getSyncBaseUri(),
`${ENDPOINT_REST_SECTIONS}/${sectionId}`,
Expand Down Expand Up @@ -142,8 +142,8 @@ describe('TodoistApi section endpoints', () => {

await api.deleteSection(sectionId, DEFAULT_REQUEST_ID)

expect(requestMock).toBeCalledTimes(1)
expect(requestMock).toBeCalledWith(
expect(requestMock).toHaveBeenCalledTimes(1)
expect(requestMock).toHaveBeenCalledWith(
'DELETE',
getSyncBaseUri(),
`${ENDPOINT_REST_SECTIONS}/${sectionId}`,
Expand Down
Loading