elm-explorations / elm-explorations/test
Exessive run time on simple test case
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
I was writing some tests when they unexpectedly started taking an inordinate amount of time to run. Up to from 2 seconds to about 15 minutes. I did some digging and traced it down to some string truncation. Here's a test which replicates the issue:
```elm
n : Int
n = 64
suite : Test
suite =
describe "Example suite"
[ fuzz string "Truncation test" <|
\s -> Expect.equal s (String.left n s)
]
```
The amount of time appears to grow drastically as `n` is increased. 64 takes a number of seconds on my machine and I'm too impatient to see how long 128 takes, but it's a while. I suspect the string shrinker is responsible but I'm not sure.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.