succss.js
function(capture) {
    // If compareTo{Page|Viewport} option is set, gets the filepath corresponding
    // to the capture index (page, capture, viewport):
    if (options.compareToViewport || options.compareToPage) {
      var pageReference = options.compareToPage || capture.page.name;
      var viewportReference = options.compareToViewport || capture.viewport.name;
      return createCaptureState(pageReference, capture.name, viewportReference).filePath;
    }
    else {
      return capture.filePath;
    }
  }
function(capture) {
    // If compareTo{Page|Viewport} option is set, gets the filepath corresponding
    // to the capture index (page, capture, viewport):
    if (options.compareToViewport || options.compareToPage) {
      var pageReference = options.compareToPage || capture.page.name;
      var viewportReference = options.compareToViewport || capture.viewport.name;
      return createCaptureState(pageReference, capture.name, viewportReference).filePath;
    }
    else {
      return capture.filePath;
    }
  }
function ( capture ) { // If compareTo{Page|Viewport} option is set, gets the filepath corresponding // to the capture index (page, capture, viewport): if ( options . compareToViewport || options . compareToPage ) { var pageReference = options . compareToPage || capture . page . name ; var viewportReference = options . compareToViewport || capture . viewport . name ; return createCaptureState ( pageReference , capture . name , viewportReference ) . filePath ; } else { return capture . filePath ; } }
Returns a filepath used as image reference.

@param {Object} capture state
@returns {String} base image filepath
Returns a filepath used as image reference .