exercises
exercises copied to clipboard
Change the expected test case result for `throttle`.
Changes the expected result of the throttle
test case named: will execute every threshold ms
to [0, 10, 20, 30, 40, 50]
. Resolves #33.
There really isn't a clean way to fix this as is. I've changed it to use a kicker. Let me know if that works for you https://github.com/kolodny/exercises/tree/fix-time-issues
Thank you very much for putting in the time to improve the testing. This repository has been very educational for me.
I have gotten the test to pass several times, but it doesn't appear to work reliably. Using the test file with the kicker, I sometimes get AssertionError: [ 0, 10, 20, 30, 40, 50, 60 ] deepEqual [ 0, 10, 20, 30, 40, 50 ]
.
I have also gotten variable results like [ 0, 10, 20, 30, 40, 40, 50 ]
with unexpected doubled values.
Here's the throttling function I'm using: https://gist.github.com/mtso/1e59a17ccebcba4123b60951072bb359
I recognize now that this might be trickier than I first imagined.