function setupAnalyzerTest() {
  if (hasRunBefore) {
    return;
  }

  const originalReferenceProjectPaths = InputDataService.referenceProjectPaths;
  const cacheDisabledQInitialValue = QueryService.cacheDisabled;
  const cacheEnabledIInitialValue = memoize.isCacheEnabled;

  before(() => {
    QueryService.cacheDisabled = true;
    memoize.disableCaching();
    suppressNonCriticalLogs();
  });

  after(() => {
    QueryService.cacheDisabled = cacheDisabledQInitialValue;
    memoize.restoreCaching(cacheEnabledIInitialValue);
    restoreSuppressNonCriticalLogs();
  });

  beforeEach(() => {
    InputDataService.referenceProjectPaths = [];
  });

  afterEach(() => {
    InputDataService.referenceProjectPaths = originalReferenceProjectPaths;
    restoreMockedProjects();
  });

  hasRunBefore = true;
}
@typedef {import('../types/index.js').QueryResult} QueryResult