feat(parent structure): add method that return note parent structure #837
Annotations
4 errors and 1 warning
src/presentation/http/router/note.test.ts#L561
AssertionError: expected { …(5) } to match object { parents: { items: [ …(2) ] } }
- Expected
+ Received
Object {
+ "accessRights": Object {
+ "canEdit": true,
+ },
+ "note": Object {
+ "content": Object {
+ "blocks": Array [
+ Object {
+ "data": Object {
+ "text": "text",
+ },
+ "id": "mJDq8YbvqO",
+ "type": "paragraph",
+ },
+ Object {
+ "data": Object {
+ "level": 2,
+ "text": "fdgsfdgfdsg",
+ },
+ "id": "DeL0QehzGe",
+ "type": "header",
+ },
+ ],
+ },
+ "createdAt": "2024-09-14T23:20:16.749Z",
+ "id": "5BExMw7KPA",
+ "updatedAt": "2024-09-14T23:20:16.749Z",
+ },
+ "parentNote": Object {
+ "content": Object {
+ "blocks": Array [
+ Object {
+ "data": Object {
+ "text": "text",
+ },
+ "id": "mJDq8YbvqO",
+ "type": "paragraph",
+ },
+ Object {
+ "data": Object {
+ "level": 2,
+ "text": "fdgsfdgfdsg",
+ },
+ "id": "DeL0QehzGe",
+ "type": "header",
+ },
+ ],
+ },
+ "createdAt": "2024-09-14T23:20:16.746Z",
+ "id": "PB42lOHjBd",
+ "updatedAt": "2024-09-14T23:20:16.746Z",
+ },
"parents": Object {
"items": Array [
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "PB42lOHjBd",
+ "createdAt": "2024-09-14T23:20:16.746Z",
+ "id": "1",
+ "updatedAt": "2024-09-14T23:20:16.746Z",
},
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "5BExMw7KPA",
+ "createdAt": "2024-09-14T23:20:16.749Z",
+ "id": "2",
+ "updatedAt": "2024-09-14T23:20:16.749Z",
},
],
},
+ "tools": Array [
+ Object {
+ "exportName": "Header",
+ "id": "1",
+ "isDefault": true,
+ "name": "header",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js",
+ },
+ "title": "Heading",
+ "userId": null,
+ },
+ Object {
+ "exportName": "Paragraph",
+ "id": "2",
+ "isDefault": true,
+ "name": "paragraph",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dist/paragraph.umd.min.js",
+ },
+ "title": "Paragraph",
+ "userId": null,
+ },
+ ],
}
❯ src/presentation/http/router/note.test.ts:561:32
|
src/presentation/http/router/note.test.ts#L626
AssertionError: expected { …(5) } to match object { parents: { items: [ …(3) ] } }
- Expected
+ Received
Object {
+ "accessRights": Object {
+ "canEdit": true,
+ },
+ "note": Object {
+ "content": Object {
+ "blocks": Array [
+ Object {
+ "data": Object {
+ "text": "text",
+ },
+ "id": "mJDq8YbvqO",
+ "type": "paragraph",
+ },
+ Object {
+ "data": Object {
+ "level": 2,
+ "text": "fdgsfdgfdsg",
+ },
+ "id": "DeL0QehzGe",
+ "type": "header",
+ },
+ ],
+ },
+ "createdAt": "2024-09-14T23:20:16.842Z",
+ "id": "NN3HIrB83J",
+ "updatedAt": "2024-09-14T23:20:16.842Z",
+ },
+ "parentNote": Object {
+ "content": Object {
+ "blocks": Array [
+ Object {
+ "data": Object {
+ "text": "text",
+ },
+ "id": "mJDq8YbvqO",
+ "type": "paragraph",
+ },
+ Object {
+ "data": Object {
+ "level": 2,
+ "text": "fdgsfdgfdsg",
+ },
+ "id": "DeL0QehzGe",
+ "type": "header",
+ },
+ ],
+ },
+ "createdAt": "2024-09-14T23:20:16.838Z",
+ "id": "SNj4FNU22J",
+ "updatedAt": "2024-09-14T23:20:16.838Z",
+ },
"parents": Object {
"items": Array [
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "sD5gXg-uZ0",
+ "createdAt": "2024-09-14T23:20:16.835Z",
+ "id": "1",
+ "updatedAt": "2024-09-14T23:20:16.835Z",
},
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "SNj4FNU22J",
+ "createdAt": "2024-09-14T23:20:16.838Z",
+ "id": "2",
+ "updatedAt": "2024-09-14T23:20:16.838Z",
},
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "NN3HIrB83J",
+ "createdAt": "2024-09-14T23:20:16.842Z",
+ "id": "3",
+ "updatedAt": "2024-09-14T23:20:16.842Z",
},
],
},
+ "tools": Array [
+ Object {
+ "exportName": "Header",
+ "id": "1",
+ "isDefault": true,
+ "name": "header",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js",
+ },
+ "title": "Heading",
+ "userId": null,
+ },
+ Object {
+ "exportName": "Paragraph",
+ "id": "2",
+ "isDefault": true,
+ "name": "paragraph",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dis
|
src/presentation/http/router/note.test.ts#L673
AssertionError: expected { …(4) } to match object { parents: { items: [ { …(2) } ] } }
- Expected
+ Received
Object {
+ "accessRights": Object {
+ "canEdit": true,
+ },
+ "note": Object {
+ "content": Object {
+ "blocks": Array [
+ Object {
+ "data": Object {
+ "text": "text",
+ },
+ "id": "mJDq8YbvqO",
+ "type": "paragraph",
+ },
+ Object {
+ "data": Object {
+ "level": 2,
+ "text": "fdgsfdgfdsg",
+ },
+ "id": "DeL0QehzGe",
+ "type": "header",
+ },
+ ],
+ },
+ "createdAt": "2024-09-14T23:20:16.921Z",
+ "id": "jYJmW8ANj2",
+ "updatedAt": "2024-09-14T23:20:16.921Z",
+ },
"parents": Object {
"items": Array [
Object {
"content": Object {
"blocks": Array [
Object {
"data": Object {
"text": "text",
},
"id": "mJDq8YbvqO",
"type": "paragraph",
},
Object {
"data": Object {
"level": 2,
"text": "fdgsfdgfdsg",
},
"id": "DeL0QehzGe",
"type": "header",
},
],
},
- "id": "jYJmW8ANj2",
+ "createdAt": "2024-09-14T23:20:16.921Z",
+ "id": "1",
+ "updatedAt": "2024-09-14T23:20:16.921Z",
},
],
},
+ "tools": Array [
+ Object {
+ "exportName": "Header",
+ "id": "1",
+ "isDefault": true,
+ "name": "header",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js",
+ },
+ "title": "Heading",
+ "userId": null,
+ },
+ Object {
+ "exportName": "Paragraph",
+ "id": "2",
+ "isDefault": true,
+ "name": "paragraph",
+ "source": Object {
+ "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dist/paragraph.umd.min.js",
+ },
+ "title": "Paragraph",
+ "userId": null,
+ },
+ ],
}
❯ src/presentation/http/router/note.test.ts:673:32
|
|
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
This job failed
Loading