 (const testData of tests) {
        test(function () {
          // Get the selection object and set startNode to it.
          const selection = window.getSelection();
          selection.removeAllRanges();
          selection.setBaseAndExtent(
            testData.startNode,
            testData.anchorOffset,
            testData.startNode,
            testData.focusOffset
          );
          // Modify the selection as per the direction and granularity of the test
          testData.elementUnderTest.f