-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Description
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 basic querySelector():
const myTable = this.element.querySelector(/* my-selector */)
assert.dom('tbody > tr', myTable).exists({ count: 2 })
// -------------------------^
// const myTable: Element | null
// Argument of type 'Element | null' is not assignable to parameter of type 'Element | undefined'.
// Type 'null' is not assignable to type 'Element | undefined'.rootElement should also be accepted as null:
dom(target?: string | Element | null, rootElement?: Element | null): DOMAssertions; Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels