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

Be within x percent of? #11

Open
thedamon opened this issue Dec 16, 2018 · 2 comments
Open

Be within x percent of? #11

thedamon opened this issue Dec 16, 2018 · 2 comments

Comments

@thedamon
Copy link

thedamon commented Dec 16, 2018

I'm testing a lot of numbers that are the result of looped calculations and the further the go the more 'off' they will be, but still potentially acceptably.

I was thinking to test these a within percentage of sort of function would be great and since they're in objects I was happy to find your library. Wondered if you had any interest in extending it in that area..

I'm not sure of an equivalent name of a test to build off of though

@maasencioh
Copy link
Owner

That has all the sense, especially taking in mind that the relative error is sometimes more interesting than the absolute one, what is your proposal for the api?

@thedamon
Copy link
Author

I'm not sure! Trying to think of a term that is short but also distinguishes between absolute and relative approximation. Maybe is relatively close to(target, percecntageDeviation)... Been meaning to look for equivalent APIs in other testing libraries

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

No branches or pull requests

2 participants