function expectResultsHTML(expectedResults) {

  return getDiagramJS().invoke(function(canvas) {

    var resultNodes = domQueryAll(SearchPad.RESULT_SELECTOR, canvas.getContainer());

    expect(resultNodes).to.have.length(expectedResults.length);

    expectedResults.forEach((expectedResult, idx) => {
      var primaryHTML = domQuery('.djs-search-result-primary', resultNodes[idx]).innerHTML;
      var secondaryHTML = domQuery('.djs-search-result-secondary', resultNodes[idx]).innerHTML;

      expect(primaryHTML).to.eql(
        expectedResult.primary
      );

      expect(secondaryHTML).to.eql(
        expectedResult.secondary
      );
    });
  });
}
@param { { primary: string, secondary: string }[] } expectedResults