code: function removeDir(dirPath, delay = 0) {
      return new Promise((resolve, reject) => {
          setTimeout(() => {
              rimraf(dirPath, {
                  maxBusyTries: 100
              }, (err) => {
                  if (err) {
                      reject(err);
                  } else {
                      resolve();
                  }
              });
          }, delay);
      });
  }
docs: Promisfied rimraf.
  
  @param {string} dirPath - path to the dir to be deleted
  @param {number} delay - delay the task by ms
  @returns {Promise<any>}