fix(chai-dom-diff): scope promise result to dom assertions #2697
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2675
What I did
.dom.
,.lightDom.
,.shadowDom.
)Step 3 there is particularly brittle. The main risks, as I see them, are that
a) I haven't covered every use in the global/upstream namespace. A med/high risk, but should fail in an obvious way
b) chai will add more APIs. A low risk
c) likely not to interop with other plugins on the chain. A med risk, but is that a case we really want to support? what further modifications to the assertion would a user need to make to the assertion, once it enters one of our namespaces (
dom
,lightDom
, orshadowDom
)?I have my 馃 that chai 5 will be out before this becomes a real problem.
Testing instructions
Please test with both TDD/BDD styles (
assert
/expect
). I typically useexpect
so I didn't exhaustively testassert.