code: function matchReference(matchType = 'withinTolerance') {
    // eslint-disable-next-line no-underscore-dangle
    new chai.Assertion(this._obj).to.be.instanceof(Array);
  
    if (matchType) {
      new chai.Assertion(matchType).to.be.oneOf(['withinTolerance', 'exactly']);
    }
  
    // eslint-disable-next-line no-underscore-dangle
    const screenshots = this._obj;
    const matchExactly = matchType === 'exactly';
  
    const testDescription = visualRegression.getTestDescription(matchType);
    const comparisonResults = getComparisonResults(screenshots, matchExactly);
  
    let imagesMatch;
    if (matchExactly) {
      imagesMatch = screenshots.every(screenshot => (screenshot && screenshot.isSameDimensions && screenshot.isExactSameImage));
    } else {
      imagesMatch = screenshots.every(screenshot => (screenshot && screenshot.isSameDimensions && screenshot.isWithinMisMatchTolerance));
    }
  
    this.assert(
      imagesMatch === true,
      `expected to ${testDescription}, but received the following comparison results \n${comparisonResults}`,
      `did not expected to ${testDescription}, but received the following comparison results \n${comparisonResults}`,
    );
  }
docs: A visual regression chai assertion to be paired with browser.capture() visual regression tests.
  Checks if the screenshot(s) are the same size and verifies the screenshots are either within
  the mismatch tolerance match or an exact match.
  @property {String} matchType - Which assertion to make. Either 'withinTolerance' or 'exactly'.
  Defaults to 'withinTolerance'.