diff --git a/checks.js b/checks.js index 155ea2b..e517b9c 100644 --- a/checks.js +++ b/checks.js @@ -9,7 +9,7 @@ function hasFullSupport() { module.exports.hasFullSupport = hasFullSupport; function hasTracingChannel() { - return hasFullSupport(); + return MAJOR >= 20; } module.exports.hasTracingChannel = hasTracingChannel; @@ -21,7 +21,7 @@ function hasDiagnosticsChannel() { module.exports.hasDiagnosticsChannel = hasDiagnosticsChannel; function hasTopSubscribeUnsubscribe() { - return hasFullSupport() + return MAJOR >= 20 || (MAJOR === 16 && MINOR >= 17) || (MAJOR === 18 && MINOR >= 7); } @@ -38,7 +38,7 @@ function hasZeroSubscribersBug() { module.exports.hasZeroSubscribersBug = hasZeroSubscribersBug; function hasChannelStoreMethods() { - return hasFullSupport() + return MAJOR === 20 || (MAJOR === 19 && MINOR >= 9); } module.exports.hasChannelStoreMethods = hasChannelStoreMethods; diff --git a/test/test-diagnostics-channel-tracing-channel-async.spec.js b/test/test-diagnostics-channel-tracing-channel-async.spec.js index 2950088..f583bc1 100644 --- a/test/test-diagnostics-channel-tracing-channel-async.spec.js +++ b/test/test-diagnostics-channel-tracing-channel-async.spec.js @@ -57,7 +57,7 @@ test('test-diagnostics-channel-tracing-channel-async', (t) => { try { channel.traceCallback(common.mustNotCall(), 0, input, thisArg, 1, 2, 3); } catch (err) { - if (MAJOR >= 20 && MINOR >= 6) { + if (MAJOR >= 20) { // By default, this error message is used for all of v20 // However, patch-sync-unsubscribe-bug causes the error to change to the older version mentioning Array t.ok(/"callback" argument must be of type function/.test(err.message));