addClass in Twig with if statement in item-list.html.twig
I might be wrong here, as we do know know what problem you are having...

But {{ item.attributes.addClass('list-group-item') }} will add the list-group-item class to the item-element. (It does not print this class.)

Because of the surrounding code: {% if item.attributes.hasClass('facet-item') %} ... {% endif %}, I feel you want to add a class to the childs of item, not to item itself.

Why not output this instead? 

&lt;li class="list-group-item"&gt;{{item.value}}&lt;/li&gt;


So the condition becomes:

{% if item.attributes.hasClass('facet-item') %}
  &lt;li class="list-group-item"&gt;{{item.value}}&lt;/li&gt;
{% endif %}