serenity/Tests/LibWeb/Text/input/setInterval.html
Aliaksandr Kalenik fe3a824ad4 Tests/LibWeb: Add basic tests for setTimeout and setInterval
It is useful to have at least very basic tests for those APIs :)
2023-09-26 19:42:59 +02:00

14 lines
344 B
HTML

<script src="include.js"></script>
<script>
asyncTest(done => {
let count = 0;
let intervalId = setInterval(() => {
println("setInterval completed count=" + count++);
if (count === 3) {
clearInterval(intervalId);
done();
}
}, 0);
});
</script>