code: function checkOutput() {
          // Note that we shift the output array here.
          const getNextOutputBlock = () => R.defaultTo('', output.shift());
  
          let isFound = false;
  
          do {
            isFound = R.contains(text, getNextOutputBlock());
          } while (!isFound && !R.isEmpty(output));
  
          if (isFound) {
            clearInterval(intervalID);
            resolve();
          }
        }
docs: /* eslint-enable no-use-before-define