-
Notifications
You must be signed in to change notification settings - Fork 39
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
“Maximum call stack size exceeded” on comparison of large data structures #22
Comments
As a workaround I only verified a subset of the data structure, which works fine so this isn't a blocker for me. |
You can also try running your tests with an increased stack size: |
I ran into this problem when I was comparing a large Model data structure. However, I really just needed to check a single field of the model, not the entire model. Passing a record accessor function in the pipeline like this:
...avoided the stack size exception and resulted in a readable failing test diff. You might not always be able to simplify comparisons like this, but it's worth asking yourself why you need to compare large data structures when testing. |
I stumbled across this crash when I migrated one of my Elm projects to 0.19. This is the test I wrote with Elm 0.18, where it worked without problems: https://gitlab.com/MazeChaZer/knobster/blob/8d39fa8de9f5744cdaff45755b23050f4d9d06e0/tests/GridTest.elm
elm: 0.19.0
elm-explorations/test: 1.1.0
node-test-runner: 0.19.0-beta8
SSCCE:
Output:
A normal
==
comparison is no problem with this data structure: https://ellie-app.com/3fQ2FSpkxYca1The text was updated successfully, but these errors were encountered: