Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(chai-dom-diff): scope promise result to dom assertions #2697

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennypowers
Copy link
Member

@bennypowers bennypowers commented Jul 17, 2023

Fixes #2675

What I did

  1. Remove our augmentations from Chai's global namespace
  2. Extend Chai's namespace for our methods
  3. Re-implement language chains on our namespace objects (.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, or shadowDom)?

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 use expect so I didn't exhaustively test assert.

@changeset-bot
Copy link

changeset-bot bot commented Jul 17, 2023

馃 Changeset detected

Latest commit: 513e64e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@open-wc/semantic-dom-diff Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sementic-dom-diff] Typings added in 0.19.8 interfere with all Should assertions
1 participant