diff --git a/test/parallel/test-uv-binding-constant.js b/test/parallel/test-uv-binding-constant.js index 11d9f6aa09cfd1..12f19188281262 100644 --- a/test/parallel/test-uv-binding-constant.js +++ b/test/parallel/test-uv-binding-constant.js @@ -13,8 +13,7 @@ const keys = Object.keys(uv); keys.forEach((key) => { if (key.startsWith('UV_')) { const val = uv[key]; - assert.throws(() => uv[key] = 1, - /^TypeError: Cannot assign to read only property/); + assert.throws(() => uv[key] = 1, TypeError); assert.strictEqual(uv[key], val); } });