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

changing parseInt to parseFloat so that non-int measurements don't get chopped off #13

Merged
merged 1 commit into from
Oct 23, 2013

Conversation

klamping
Copy link
Contributor

This error occurred when using:
Then "post title" should have "font-size" of greater than "26px"

The problem was that 'post title' has a computed font-size of 26.6666px, but in the greater/less comparison, it does a parseInt which rounds that down to 26. I want to measure that the size is between 26 and 28, and so parseFloat allows me to do that.

On a side note, I wasn't able to run the tests for some reason on my computer. Hopefully TravisCI doesn't have trouble.

@thingsinjars thingsinjars merged commit d866c46 into thingsinjars:master Oct 23, 2013
@thingsinjars
Copy link
Owner

The tests ran okay for me so I pulled it in and wrote another unit test for floating point comparisons, too.

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 this pull request may close these issues.

None yet

2 participants