This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$interval ngMock has infinite loop when delay argument is equivalent to zero #15952
Closed
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (see above))
Current behavior:
When writing a spec if an interval is set with a delay argument equivalent to zero, then using the flush method will generate an infinite loop.
Expected behavior:
When running setInterval(..., 0);
in the browser it is executed almost every tick, for mock the same behavior is expected.
Minimal reproduction of the problem with instructions:
https://plnkr.co/edit/uzZeMC8ruoEOT1l2MijI?p=preview
- Open the
app.spec.js
file - Uncomment the line with the flush method
Result: the browser's tab will crush due infinite loop.
Angular version: 1.6.4
Browser: all
Anything else:
PhantomJS 2.1.1 (Windows 8 0.0.0) ERROR
Disconnected, because no message in 10000 ms.