testIdleCallbackWithInitialModules() {
    const callback = recordFunction();

    const mm = new ModuleManager();
    mm.setAllModuleInfoString('a', ['a']);
    mm.registerCallback(ModuleManager.CallbackType.IDLE, callback);

    assertTrue(mm.isActive());

    mm.beforeLoadModuleCode('a');

    assertEquals(0, callback.getCallCount());

    mm.setLoaded();

    assertFalse(mm.isActive());

    assertEquals(1, callback.getCallCount());
  }
Tests that the IDLE callbacks are executed for active->idle transitions
after setAllModuleInfoString with currently loading modules.