-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create the "equalMarkup" assertion #9668
Comments
Scope:
|
Normaly, you'd have to
There might be other custom |
Wow. I wasn't aware of this. Yes, let's move all custom assertions to |
We ended up skipping that part, so perhaps it could be extracted to a followup? |
Feature (tests): Created the `equalMarkup` and `attribute` chai assertions. They are loaded automatically when running tests. Closes ckeditor/ckeditor5#9668.
Other: Removed the `assertEqualMarkup` function and the `attribute` assertion as they have been moved to the testing environment. Closes #9668. Tests: Updated all files using `attribute` and `equalMarkup` assertions.
📝 Provide a description of the improvement
We already have the
assertEqualMarkup()
util for comparing markups.ckeditor5/packages/ckeditor5-utils/tests/_utils/utils.js
Lines 148 to 172 in 2b1ea1a
However, many of us may do not know about the helper. Also, it requires adding additional imports.
We could add a new function to chai (https://www.chaijs.com/guide/helpers/#adding-methods) that will introduce the new assertion. The goal is to have something like this:
In details, the function will use the
assertEqualMarkup()
helper.It would be nice to add the new helper to existing bindings to have the new assertion in IDE autocomplete list.
If you'd like to see, this improvement implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: