const jestCLI = {
  success: true,
  runCLI: jest.fn((config, rootDir, callback) => {
    callback(jestCLI.success);
  }),
};

module.exports = jestCLI;

const jestCLI = {
  success: true,
  runCLI: jest.fn(() => new Promise((resolve, reject) => {
    if (jestCLI.success) {
      resolve();
    } else {
      reject();
    }
  })),
};

module.exports = jestCLI;

Fix the unit tests