Hi!
It’s unfinished project but I don’t understand why I can’t pass this test:
User Story #4: I can see at least three clickable elements inside the nav
element, each with the class nav-link
.
I got this mistake:
The .nav-link with href="#features" is not linked to a corresponding element on the page : expected null to not equal null
And code:
var e=document.querySelectorAll("#nav-bar .nav-link");i.assert.isAtLeast(e.length,1,"The #nav-bar contains no .nav-link"),e.forEach(function(e){i.assert.isNotNull(e),i.assert.strictEqual(e.hasAttribute("href"),!0,"Each .nav-link element should have an href attribute ");var t=e.getAttribute("href").slice(1);i.assert.isNotNull(document.getElementById(t),'The .nav-link with href="'+e.getAttribute("href")+'" is not linked to a corresponding element on the page ')})
But anchors work fine. I don’t know why this appears.