This test is performed late. In this point you already called `preventDefault`.
I think that the `itemsSelector` might be `.nav-link[href^='#`]`.