mainmatter / qunit-dom

High Level DOM Assertions for QUnit
MIT License
179 stars 123 forks source link

feature: support IDOMElementDescriptors #2087

Closed bendemboski closed 4 months ago

bendemboski commented 11 months ago

Implement support for RFC #726

bendemboski commented 11 months ago

This PR does change existing error messages, as can be seen from the tests, which isn't an explicit goal of this change. Here's the explanation.

If an assertion couldn't find its element (whether because of a non-matching selector or because it was passed null), previously the error messaging would be inconsistent between its usage of <not found> vs. <unknown>. The code that produced those messages was refactored and is now driven by the dom element descriptor description functionality, so it would require extra code to restore the inconsistent behavior and keep the error message the same as it was before this PR.

BobrImperator commented 7 months ago

Drafted https://github.com/mainmatter/qunit-dom/pull/2101 as per feedback, would this help dom-element-descriptors to create a "plugin" for qunit-dom?

bendemboski commented 4 months ago

@BobrImperator this is rebased and, pending your decision on the assertion messages change or any other feedback you might have, ready to merge!

BobrImperator commented 4 months ago

https://github.com/mainmatter/qunit-dom/releases/tag/v3.2.0 :rocket: