Skip to content

Rounding issues in snapshot tests #101

@jbrown1618

Description

@jbrown1618

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions