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
1 of 3 tasks
Milestone
I'm submitting a ...
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
app.spec.js
fileResult: the browser's tab will crush due infinite loop.
Angular version: 1.6.4
Browser: all
Anything else:
The text was updated successfully, but these errors were encountered: