diff options
Diffstat (limited to 'test/parallel/test-timers-timeout-to-interval.js')
-rw-r--r-- | test/parallel/test-timers-timeout-to-interval.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/parallel/test-timers-timeout-to-interval.js b/test/parallel/test-timers-timeout-to-interval.js new file mode 100644 index 0000000000..6952f2231a --- /dev/null +++ b/test/parallel/test-timers-timeout-to-interval.js @@ -0,0 +1,12 @@ +'use strict'; +const common = require('../common'); + +// This isn't officially supported but nonetheless is something that is +// currently possible and as such it shouldn't cause the process to crash + +const t = setTimeout(common.mustCall(() => { + if (t._repeat) { + clearInterval(t); + } + t._repeat = true; +}, 2), 1); |