nathanboktae / chai-dom

DOM assertions for the Chai assertion library using vanilla JavaScript
Other
76 stars 26 forks source link

`.attr` matcher unexpected changes subject #65

Open SevenOutman opened 1 year ago

SevenOutman commented 1 year ago

The following assertion with Chai .and chain should work

expect(container.firstChild)
  .to.have.attr('role', 'menubar')
  .and.to.have.attr('aria-orientation', 'vertical');

But it throws

TypeError: el.getAttribute is not a function
nathanboktae commented 1 year ago

Yes that is odd. Changing the subject to the attribute isn't interesting.