parent
852d71e8b7
commit
bba9a8e008
2 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ Here's some text in between
|
|||
expect(checkboxes[0]).toBe(0)
|
||||
expect(checkboxes[1]).toBe(18)
|
||||
expect(checkboxes[2]).toBe(69)
|
||||
expect(checkboxes[3]).toBe(90)
|
||||
})
|
||||
it('should find one checkbox with *', () => {
|
||||
const text: string = '* [ ] Lorem Ipsum'
|
||||
|
|
|
@ -40,7 +40,7 @@ export const findCheckboxesInText = (text: string): number[] => {
|
|||
return [
|
||||
...checkboxes.checked,
|
||||
...checkboxes.unchecked,
|
||||
].sort()
|
||||
].sort((a, b) => a < b ? -1 : 1)
|
||||
}
|
||||
|
||||
export const getChecklistStatistics = (text: string): CheckboxStatistics => {
|
||||
|
|
Loading…
Reference in a new issue