docs: function handleDirConfig(dir, files, parentDirConfig) {
    let config;
    if (files.includes(gT.engineConsts.dirConfigName)) {
      config = nodeUtils.requireEx(path.join(dir, gT.engineConsts.dirConfigName), true).result;
    } else {
      config = {};
    }
  
    // TODO: some error when suite configs or root configs is met in wrong places.
    _.pullAll(files, [
      gT.engineConsts.suiteConfigName,
      gT.engineConsts.dirConfigName,
      gT.engineConsts.suiteResDirName,
      gT.engineConsts.rootResDirName,
      gT.engineConsts.dirRootConfigName,
      gT.engineConsts.suiteRootConfigName,
    ]);
  
    if (config.require) {
      nodeUtils.requireArray(config.require);
    }
  
    const dirCfg = _.merge(_.cloneDeep(parentDirConfig), config);
  
    if (dirCfg.ignoreNames) {
      _.pullAll(files, dirCfg.ignoreNames);
    }
  
    if (config.browserProfileDir) {
      dirCfg.browserProfilePath = path.join(gIn.suite.browserProfilesPath, config.browserProfileDir);
    } else {
      dirCfg.browserProfilePath = gT.defaultRootProfile;
    }
  
    gIn.tracer.msg2(`Profile path: ${dirCfg.browserProfilePath}`);
  
    return dirCfg;
  }