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

Incorrect typing for hasProperty assertion #781

Closed
wuron opened this issue Aug 9, 2020 · 0 comments · Fixed by #782
Closed

Incorrect typing for hasProperty assertion #781

wuron opened this issue Aug 9, 2020 · 0 comments · Fixed by #782

Comments

@wuron
Copy link
Contributor

wuron commented Aug 9, 2020

hasProperty assertion is defined as hasProperty(name: string, value: string | RegExp, message?: string) but properties, unlike attributes, are not limited to just strings.

I’d like to use hasProperty to assert for checked property on checkbox input in typescript with the following assertion:

assert.dom('input').hasProperty('checked', true);

but this results in typescript error.

Asserting for stringified value ("true") is incorrect and results in failed test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant