Skip to content

Commit be17cc5

Browse files
TrottBethGriggs
authored andcommitted
test: make test-uv-binding-constant JS engine neutral
The error message validation in test-uv-binding-constant depends on the JS engine. The text will be different in node-chakracore than in V8-based versions of Node.js. Remove the message validation. Test that it is a TypeError only. We should only validate error messages when we control the contents of that error message (and not even necessarily then, but that is a minimum requirement). V8 and other underlying engines can change the error message at any time and that should not require us to change our tests (as changing tests suggests a semver-major change). PR-URL: #24666 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 3e4b93a commit be17cc5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/parallel/test-uv-binding-constant.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ const keys = Object.keys(uv);
1111
keys.forEach((key) => {
1212
if (key.startsWith('UV_')) {
1313
const val = uv[key];
14-
assert.throws(() => uv[key] = 1,
15-
/^TypeError: Cannot assign to read only property/);
14+
assert.throws(() => uv[key] = 1, TypeError);
1615
assert.strictEqual(uv[key], val);
1716
}
1817
});

0 commit comments

Comments
 (0)