mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
56b8de1699
PR-URL: https://github.com/nodejs/node/pull/48633 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
19 lines
509 B
JavaScript
19 lines
509 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
const timer = setTimeout(common.mustNotCall(), 10);
|
|
const interval = setInterval(common.mustNotCall(), 10);
|
|
const immediate = setImmediate(common.mustNotCall());
|
|
|
|
timer[Symbol.dispose]();
|
|
interval[Symbol.dispose]();
|
|
immediate[Symbol.dispose]();
|
|
|
|
|
|
process.on('exit', () => {
|
|
assert.strictEqual(timer._destroyed, true);
|
|
assert.strictEqual(interval._destroyed, true);
|
|
assert.strictEqual(immediate._destroyed, true);
|
|
});
|