index.js
function(dir, prefix) {
    if (fs.existsSync(dir)) {
      let dirname = path.relative(this.project.root, dir);
      let globs = this.parentRegistry.extensionsForType('js').map((extension) => `**/*.${extension}`);

      return walkSync(dir, { directories: false, globs }).map(file => {
        let module = prefix + '/' + file.replace(EXT_RE, '.js');
        this.fileLookup[module] = path.join(dirname, file);
        return module;
      });
    } else {
      return [];
    }
  }
function(dir, prefix) {
    if (fs.existsSync(dir)) {
      let dirname = path.relative(this.project.root, dir);
      let globs = this.parentRegistry.extensionsForType('js').map((extension) => `**/*.${extension}`);

      return walkSync(dir, { directories: false, globs }).map(file => {
        let module = prefix + '/' + file.replace(EXT_RE, '.js');
        this.fileLookup[module] = path.join(dirname, file);
        return module;
      });
    } else {
      return [];
    }
  }
function ( dir , prefix ) { if ( fs . existsSync ( dir ) ) { let dirname = path . relative ( this . project . root , dir ) ; let globs = this . parentRegistry . extensionsForType ( 'js' ) . map ( ( extension ) => ` ${ extension } ` ) ; return walkSync ( dir , { directories : false , globs } ) . map ( file => { let module = prefix + '/' + file . replace ( EXT_RE , '.js' ) ; this . fileLookup [ module ] = path . join ( dirname , file ) ; return module ; } ) ; } else { return [ ] ; } }
Get paths to include for coverage
@param {String} dir Include all js files under this directory.
@param {String} prefix The prefix to the ember module ('app', 'dummy' or the name of the addon).
@returns {Array<String>} include paths
Get paths to include for coverage