Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit be97f71

Browse filesBrowse files
himself65targos
authored andcommitted
test: refactor test-accessor-properties
PR-URL: #29943 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 1743738 commit be97f71
Copy full SHA for be97f71

File tree

Expand file treeCollapse file tree

1 file changed

+5
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-12
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-accessor-properties.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-accessor-properties.js
+5-12Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ const UDP = internalBinding('udp_wrap').UDP;
1616

1717
{
1818
// Should throw instead of raise assertions
19-
assert.throws(() => {
20-
TTY.prototype.bytesRead;
21-
}, TypeError);
22-
23-
assert.throws(() => {
24-
TTY.prototype.fd;
25-
}, TypeError);
26-
27-
assert.throws(() => {
28-
TTY.prototype._externalStream;
29-
}, TypeError);
30-
3119
assert.throws(() => {
3220
UDP.prototype.fd;
3321
}, TypeError);
@@ -36,6 +24,11 @@ const UDP = internalBinding('udp_wrap').UDP;
3624
const properties = ['bytesRead', 'fd', '_externalStream'];
3725

3826
properties.forEach((property) => {
27+
// Should throw instead of raise assertions
28+
assert.throws(() => {
29+
TTY.prototype[property];
30+
}, TypeError, `Missing expected TypeError for TTY.prototype.${property}`);
31+
3932
// Should not throw for Object.getOwnPropertyDescriptor
4033
assert.strictEqual(
4134
typeof Object.getOwnPropertyDescriptor(StreamWrapProto, property),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.