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

Selector API should report NaN instead of integer when type validations failed #2470

Closed
AndreyBelym opened this issue May 30, 2018 · 1 comment
Assignees
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@AndreyBelym
Copy link
Contributor

Are you requesting a feature or reporting a bug?

Bug

What is the current behavior?

When NaN is passed to the Selector.nth() method, type validations throw the following cryptic error:

"index" argument is expected to be a number, but it was number.

What is the expected behavior?

Errors with NaN error must be reported clearly:

"index" argument is expected to be a number, but it was NaN.

How would you reproduce the current behavior (if this is a bug)?

const element = Selector('div').nth(NaN)

Specify your

  • operating system: any
  • testcafe version: 0.20.2
  • node.js version: 10.1.0
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…evExpress#2550)

* fix error message for is.number assertion (closes DevExpress#2470)

* add check for infinity
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: automations TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants