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

Rounding issues in snapshot tests #101

Open
jbrown1618 opened this issue Dec 30, 2019 · 0 comments
Open

Rounding issues in snapshot tests #101

jbrown1618 opened this issue Dec 30, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@jbrown1618
Copy link
Owner

Some snapshot tests run into issues on older versions of Node because of minor changes to the Math implementations.

My solution so far is to round off all the values in snapshotted matrices that cause problems. But doing all the rounding takes far longer than the rest of the test put together.

Maybe the solution is not to snapshot these matrices, or maybe there is a faster way to round numbers than converting to a string and back with Number(num.toFixed(decimals)).

See RadialBasisFunction.spec.ts and GaussianKernel.spec.ts - these both fail on Node 10.X without the rounding workaround.

@jbrown1618 jbrown1618 added the bug Something isn't working label Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant