bustle / mobiledoc-kit

A toolkit for building WYSIWYG editors with Mobiledoc
https://bustle.github.io/mobiledoc-kit/demo/
MIT License
1.55k stars 150 forks source link

Restrict DOM selector assertion to the QUnit fixture element 🦨 #709

Closed ZeeJab closed 4 years ago

ZeeJab commented 4 years ago

While working on an unrelated change, I noticed that a test was passing inappropriately because the assertion was matching against the qunit test results rather than the element under test. This change scopes the hasElement assertion to be applied within the qunit fixture element, not the entire document.

As a result of the now failing test, I changed that test to be asynchronous to give SelectionChangeObserver an opportunity to fire.