function assertSelectionsEquals (t, selections, expected) {
  t.equal(selections.length, expected.length)
  const selectionItems = [...selections._items]
  selectionItems.sort((a, b) => a.from - b.from)
  expected.sort((a, b) => a[0] - b[0])

  for (let i = 0; i < expected.length; i++) {
    const actualRange = [selectionItems[i].from, selectionItems[i].to]
    const expectedRange = expected[i]
    t.deepEqual(actualRange, expectedRange)
  }
}
@param {import('tape').Test} t
@param {import('../../lib/selections.js').Selections} selections
@param {[number,number][]} expected