Skip to content

Commit

Permalink
test: remove timers test from test-handle-wrap-isrefed.js
Browse files Browse the repository at this point in the history
Since this doesn't work:
process.binding('timer_wrap');
  • Loading branch information
RaisinTen committed Feb 10, 2021
1 parent 08ef35c commit 14bf7cf
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions test/parallel/test-handle-wrap-isrefed.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,4 @@ const { kStateSymbol } = require('internal/dgram');
}


// timers
{
const { Timer } = process.binding('timer_wrap');
strictEqual(Object.values(getActiveResources()).filter(
(handle) => (handle instanceof Timer)).length, 0);
const timer = setTimeout(() => {}, 500);
const handles = Object.values(getActiveResources()).filter(
(handle) => (handle instanceof Timer));
strictEqual(handles.length, 1);
const handle = handles[0];
strictEqual(Object.getPrototypeOf(handle).hasOwnProperty('hasRef'),
true, 'timer_wrap: hasRef() missing');
strictEqual(handle.hasRef(), true);
timer.unref();
strictEqual(handle.hasRef(),
false, 'timer_wrap: unref() ineffective');
timer.ref();
strictEqual(handle.hasRef(),
true, 'timer_wrap: ref() ineffective');
}

// See also test/pseudo-tty/test-handle-wrap-isrefed-tty.js

0 comments on commit 14bf7cf

Please sign in to comment.