| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,18 +16,6 @@ const UDP = internalBinding('udp_wrap').UDP; | |||
| 16 | 16 | ||
| 17 | 17 | { | |
| 18 | 18 | // 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 | - | ||
| 31 | 19 | assert.throws(() => { | |
| 32 | 20 | UDP.prototype.fd; | |
| 33 | 21 | }, TypeError); | |
@@ -36,6 +24,11 @@ const UDP = internalBinding('udp_wrap').UDP; | |||
| 36 | 24 | const properties = ['bytesRead', 'fd', '_externalStream']; | |
| 37 | 25 | ||
| 38 | 26 | 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 | + | ||
| 39 | 32 | // Should not throw for Object.getOwnPropertyDescriptor | |
| 40 | 33 | assert.strictEqual( | |
| 41 | 34 | typeof Object.getOwnPropertyDescriptor(StreamWrapProto, property), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments