|
4 | 4 | const common = require('../common'); |
5 | 5 | const strictEqual = require('assert').strictEqual; |
6 | 6 | const { internalBinding } = require('internal/test/binding'); |
7 | | -const { getActiveResources } = require('async_hooks'); |
8 | 7 |
|
9 | 8 | // child_process |
10 | 9 | { |
@@ -108,25 +107,4 @@ const { kStateSymbol } = require('internal/dgram'); |
108 | 107 | } |
109 | 108 |
|
110 | 109 |
|
111 | | -// timers |
112 | | -{ |
113 | | - const { Timer } = process.binding('timer_wrap'); |
114 | | - strictEqual(Object.values(getActiveResources()).filter( |
115 | | - (handle) => (handle instanceof Timer)).length, 0); |
116 | | - const timer = setTimeout(() => {}, 500); |
117 | | - const handles = Object.values(getActiveResources()).filter( |
118 | | - (handle) => (handle instanceof Timer)); |
119 | | - strictEqual(handles.length, 1); |
120 | | - const handle = handles[0]; |
121 | | - strictEqual(Object.getPrototypeOf(handle).hasOwnProperty('hasRef'), |
122 | | - true, 'timer_wrap: hasRef() missing'); |
123 | | - strictEqual(handle.hasRef(), true); |
124 | | - timer.unref(); |
125 | | - strictEqual(handle.hasRef(), |
126 | | - false, 'timer_wrap: unref() ineffective'); |
127 | | - timer.ref(); |
128 | | - strictEqual(handle.hasRef(), |
129 | | - true, 'timer_wrap: ref() ineffective'); |
130 | | -} |
131 | | - |
132 | 110 | // See also test/pseudo-tty/test-handle-wrap-isrefed-tty.js |
0 commit comments