Skip to content

Commit

Permalink
test: add test to confirm failure in #324
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed Feb 21, 2023
1 parent ea7654a commit ea79ceb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/unit/parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,21 @@ describe('parser', function() {
{ group: 'tasklist', html_url: 'https://github.com/ipfs/ipfs-gui/issues/124' }
])
})

/**
* To address https://github.com/pln-planning-tools/Starmap/issues/324
*/
it('Can parse children from issue.body_text with extraneous link', function() {
const children = getChildren({ body_html: '', body: 'eta: 2023Q4\r\n\r\nchildren:\r\n- https://github.com/filecoin-station/roadmap/issues/5\r\n- https://github.com/filecoin-station/roadmap/issues/7\r\n- https://github.com/filecoin-station/roadmap/issues/3\r\n- #10 \r\n- #11\r\n\r\nView the roadmap here: https://starmap.site/roadmap/github.com/filecoin-station/roadmap/issues/1\r\n', html_url: 'https://github.com/filecoin-station/roadmap/issues/1' });
expect(Array.isArray(children)).toBe(true);
expect(children).toHaveLength(5);
expect(children).toStrictEqual([
{ group: 'children:', html_url: 'https://github.com/filecoin-station/roadmap/issues/5' },
{ group: 'children:', html_url: 'https://github.com/filecoin-station/roadmap/issues/7' },
{ group: 'children:', html_url: 'https://github.com/filecoin-station/roadmap/issues/3' },
{ group: 'children:', html_url: 'https://github.com/filecoin-station/roadmap/issues/10' },
{ group: 'children:', html_url: 'https://github.com/filecoin-station/roadmap/issues/11' }
])
})
})
})

0 comments on commit ea79ceb

Please sign in to comment.