tasks/multimocksGenerator.js
function (config, mockSrc) {
    var mockManifestPath = path.join(process.cwd(), mockSrc,
      mockManifestFilename),

      // read manifest JSON by require'ing it
      mockManifest = require(mockManifestPath),

      // read files for default scenario first, so we can merge it into other
      // scenarios later
      defaultScenario = readScenario(config, mockSrc, [],
        mockManifest._default, '_default');

    // read files for each scenario
    return _.mapValues(mockManifest, function (filenames, scenarioName) {
      return readScenario(config, mockSrc, defaultScenario, filenames,
        scenarioName);
    });
  }
function (config, mockSrc) {
    var mockManifestPath = path.join(process.cwd(), mockSrc,
      mockManifestFilename),

      // read manifest JSON by require'ing it
      mockManifest = require(mockManifestPath),

      // read files for default scenario first, so we can merge it into other
      // scenarios later
      defaultScenario = readScenario(config, mockSrc, [],
        mockManifest._default, '_default');

    // read files for each scenario
    return _.mapValues(mockManifest, function (filenames, scenarioName) {
      return readScenario(config, mockSrc, defaultScenario, filenames,
        scenarioName);
    });
  }
function ( config , mockSrc ) { var mockManifestPath = path . join ( process . cwd ( ) , mockSrc , mockManifestFilename ) , // read manifest JSON by require'ing it mockManifest = require ( mockManifestPath ) , // read files for default scenario first, so we can merge it into other // scenarios later defaultScenario = readScenario ( config , mockSrc , [ ] , mockManifest . _default , '_default' ) ; // read files for each scenario return _ . mapValues ( mockManifest , function ( filenames , scenarioName ) { return readScenario ( config , mockSrc , defaultScenario , filenames , scenarioName ) ; } ) ; }
Read scenario definitions and return a structure that
multimockDataProvider.setMockData will understand.
Read scenario definitions and return a structure that multimockDataProvider . setMockData will understand .