(body)
| 983 | } |
| 984 | |
| 985 | function asComment(body) { |
| 986 | return { |
| 987 | id: 7, |
| 988 | body, |
| 989 | user: { login: 'decap-turbo[bot]', avatar_url: 'https://avatar' }, |
| 990 | created_at: '2026-01-01T00:00:00Z', |
| 991 | }; |
| 992 | } |
| 993 | |
| 994 | it('falls back to the comment account when the note records no author', () => { |
| 995 | const note = api().parseCommentToNote(asComment('just a comment')); |