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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw an error if an invalid rootElement is passed to assert.dom() #634

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

Turbo87
Copy link
Collaborator

@Turbo87 Turbo87 commented Mar 4, 2020

Resolves #633

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍 although I would recommend a second review from someone who is more confident in TypeScript 🙈

Copy link
Member

@marcoow marcoow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense but if you're not actually expecting an Element you might want to update the method's signature?

lib/qunit-dom.ts Show resolved Hide resolved
Copy link
Collaborator

@scalvert scalvert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good catch.

@scalvert
Copy link
Collaborator

scalvert commented Mar 4, 2020

Should we change the label to bug instead, based on the issue identifying this as a bug?

@Turbo87
Copy link
Collaborator Author

Turbo87 commented Mar 4, 2020

based on the issue identifying this as a bug?

I would consider the dom('foo', 'bar') usage itself a bug, but I don't think it's necessarily a bug that we don't catch this issue early 😉

@scalvert
Copy link
Collaborator

scalvert commented Mar 4, 2020

Fair. Seems fine.

@Turbo87 Turbo87 merged commit 60f3ff6 into mainmatter:master Mar 4, 2020
@Turbo87 Turbo87 deleted the root-element-assertion branch April 10, 2020 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assert.dom('foo', 'bar') should throw an error
4 participants