From 0e8b6267b6bdfd1c069fef8f1df8d27ef87245e9 Mon Sep 17 00:00:00 2001 From: Minggang Wang Date: Fri, 16 Oct 2026 16:14:52 +0800 Subject: [PATCH] Remove obsolete Node.js compatibility guards --- test/test-async-client.js | 8 -------- test/test-client.js | 3 --- 2 files changed, 11 deletions(-) diff --git a/test/test-async-client.js b/test/test-async-client.js index 02f457616..e8385a620 100644 --- a/test/test-async-client.js +++ b/test/test-async-client.js @@ -258,14 +258,6 @@ describe('Client async functionality', function () { }); it('should handle zero and negative timeouts', async function () { - // Skip this test on Node.js < 18.20.0: AbortSignal.timeout() was added in 17.3.0, - // but support for zero timeout values was only fixed in - // 18.20.0 (prior versions throw RangeError for AbortSignal.timeout(0)) - const [major, minor] = process.versions.node.split('.').map(Number); - if (major < 18 || (major === 18 && minor < 20)) { - this.skip(); - } - const request = { a: BigInt(1), b: BigInt(1) }; try { diff --git a/test/test-client.js b/test/test-client.js index 1a527ad93..db6603bde 100644 --- a/test/test-client.js +++ b/test/test-client.js @@ -316,8 +316,6 @@ describe('Client coverage testing', function () { }); it('sendRequestAsync handles manual abort', async function () { - if (typeof AbortController === 'undefined') this.skip(); - const client = new Client( mockHandle, mockNodeHandle, @@ -334,7 +332,6 @@ describe('Client coverage testing', function () { await promise; assert.fail('Should have aborted'); } catch (err) { - // Name might vary depending on polyfill or native assert.ok(err.name === 'AbortError', 'Error name ' + err.name); } });