Skip to content

test: add zero, minus and undefined timeout test

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test only.

Description of change

SetTimeout() and setInterval() also accept 0 msec, -1 msec or no argument. Added a test that works properly even if those arguments are specified.

setTimeout(function () {
  console.log('zero');
}, 0);

setTimeout(function () {
  console.log('minus');
}, -1);

setTimeout(function () {
  console.log('undefined');
});

Merge request reports

Loading