Closed atuttle closed 11 years ago
I can't wait to test this out! I wish travis-ci worked with CF so I didn't have to manually re-test!
I've got Jenkins running for Taffy. I'd be happy to host the tests for Underscore too. Maybe I'll do that as one of my pull requests. ;)
A jenkins server would be great!
Thanks for the css fix.
I'm getting intermittent test failures for debounce in CF. I'm running Win7 64 with CF 10 update 6. Only 1gb RAM (it's in a VM).
The failures appear when using runTests.cfm. If you can't reproduce the issues then I'll try to investigate further and provide more feedback.
There are some assertions have have to do with time elapsed, which could be different on different hardware. I'll take a look at them tonight. Can you provide any detail on the failures?
Oh and I haven't installed update 6 yet locally. Will try that too and see if it changes anything.
Installed update 6 and re-ran the tests a bunch of times. Average run time for testDebounce_ImmediateTrue
is about 107ms for me. One time I saw it go up to 127ms, and the actual result went up to 4 instead of 3. If there were something unrelated that caused a 20ms delay in there, the debounce test assertions would be wrong because it's possible that enough time would have passed from the external delay to allow the function to run. The tests are kind of written assuming they're running in a vacuum. Without adding significant sleep durations that would slow down the test suite I don't see a way around it. But it only failed for me once out of more than 30 runs.
Intermittent failures:
testDebounce_ImmediateTrue: once on the leading edge Expected [2] BUT RECEIVED [3.0]. These values should be the same.
testDebounce_ImmediateFalse: debounce calms overzealous method calling Expected [2] BUT RECEIVED [1.0]. These values should be the same.
testDelay: function delay is at least as long as requested
How about now? With the latest changes I'm not getting any failures at all with dozens and dozens of runs.
Awesome, I just confirmed that this works in CF10.
It doesn't work in Railo 4, but I have a fix for that already which I'll apply after this is merged.
Thanks a ton for implementing this!
Your changes look good. I'd have used isDefined too. I'm curious about the Railo bug tho. Have you reported it?
I haven't reported it yet. Honestly, their issue tracker scares me.
Nice, thanks
Debounce, Debounce Tests (both immediate true and false), and updated the doc generator for debounce. Also added some linebreaks in generated docs.