tasks/multimocksGenerator.js
function (config, mockSrc, defaultScenario, filenames,
      scenarioName) {
    // read mock data files for this scenario
    var scenario = filenames.map(function (filename) {
      var filepath = fs.realpathSync(path.join(mockSrc, filename));

      return {
        scenarioName: scenarioName,
        filename: filename,
        scenario: require(filepath)
      };
    });

    return scenario;
  }
function (config, mockSrc, defaultScenario, filenames,
      scenarioName) {
    // read mock data files for this scenario
    var scenario = filenames.map(function (filename) {
      var filepath = fs.realpathSync(path.join(mockSrc, filename));

      return {
        scenarioName: scenarioName,
        filename: filename,
        scenario: require(filepath)
      };
    });

    return scenario;
  }
function ( config , mockSrc , defaultScenario , filenames , scenarioName ) { // read mock data files for this scenario var scenario = filenames . map ( function ( filename ) { var filepath = fs . realpathSync ( path . join ( mockSrc , filename ) ) ; return { scenarioName : scenarioName , filename : filename , scenario : require ( filepath ) } ; } ) ; return scenario ; }
Read a scenario from a list of resource files, add URIs and merge in
resources from default scenario.
Read a scenario from a list of resource files add URIs and merge in resources from default scenario .