Factory Functions & Singleton Pattern

What testing difficulty might this singleton pattern create?
const LoggerSingleton = (() => {
  let instance;
  
  function createLogger() {
    const logs = [];
    
    function log(message) {
      const timestamp = new Date().toISOString();
      logs.push({ message, timestamp });
      console.log(`${timestamp}: ${message}`);
    }
    
    function getLogs() {
      return [...logs];
    }
    
    return { log, getLogs };
  }
  
  return {
    getInstance() {
      if (!instance) {
        instance = createLogger();
      }
      return instance;
    }
  };
})();
Next Question (30/32)