__mocks__/fs-extra-promise.js
function createDir(pathArg) {
  const { dir, ext } = path.parse(pathArg);
  const dirNames = (ext === '')
    ? pathArg.split(path.sep)
    : dir.split(pathArg.sep);

  dirNames.reduce((accumDir, currentdir) => {
    const jointDir = path.join(accumDir, currentdir);
    if (!fs.existsSync(jointDir)) {
      fs.mkdirSync(jointDir);
    }
    return jointDir;
  }, '');
}
function createDir(pathArg) {
  const { dir, ext } = path.parse(pathArg);
  const dirNames = (ext === '')
    ? pathArg.split(path.sep)
    : dir.split(pathArg.sep);

  dirNames.reduce((accumDir, currentdir) => {
    const jointDir = path.join(accumDir, currentdir);
    if (!fs.existsSync(jointDir)) {
      fs.mkdirSync(jointDir);
    }
    return jointDir;
  }, '');
}
function createDir ( pathArg ) { const { dir , ext } = path . parse ( pathArg ) ; const dirNames = ( ext === '' ) ? pathArg . split ( path . sep ) : dir . split ( pathArg . sep ) ; dirNames . reduce ( ( accumDir , currentdir ) => { const jointDir = path . join ( accumDir , currentdir ) ; if ( ! fs . existsSync ( jointDir ) ) { fs . mkdirSync ( jointDir ) ; } return jointDir ; } , '' ) ; }
Iteratively creates directories to the file or directory
@param pathArg
Iteratively creates directories to the file or directory