(notes: NoteObject[])
| 3 | import type { NoteObject } from '../src/types'; |
| 4 | |
| 5 | const getFirstNote = (notes: NoteObject[]): string | null => { |
| 6 | const first = notes.find(noteObj => noteObj.note)?.note; |
| 7 | if (!first || !first.length) { |
| 8 | return null; |
| 9 | } |
| 10 | return first[0] || null; |
| 11 | }; |
| 12 | |
| 13 | describe('../src/cli', () => { |
| 14 | it('prints help and exits with code 0', () => { |