-
Notifications
You must be signed in to change notification settings - Fork 123
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
Types - Interface Assert, rootElement
should also be null
#882
Comments
hmm... I'm not sure I agree. If that Passing in an element will use that element as the root element. Not passing in anything should default to using the default root element. But explicitly passing in |
I kind of agree @Turbo87 but not entirely.
Nothing. The same that would happen with On the other hand, why should we have to do something like this every time to specifically match with the signature? const myTable = this.element.querySelector(/* my-selector */)
assert.dom('tbody > tr', myTable || undefined).exists({ count: 2 }) The thing is, |
Any update on this please :)? The type returned by
Even if, in the context of a test, we know our element should exist me might have made a mistake in the selector and const myElem = this.element.querySelector(/* my-selector */)
assert.dom('.some-class', myElem).exists({ count: 2 }) |
rootElement
can also be null
rootElement
should also be null
Current signature of the method
dom()
:https://github.com/simplabs/qunit-dom/blob/6c31d65d825c8c09fab1c4f604b8a89945c06e11/lib/qunit-dom.ts#L10
But it is not completely accurate and triggers an error when
rootElement
comes from a basicquerySelector()
:rootElement
should also be accepted asnull
:The text was updated successfully, but these errors were encountered: