| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f897860 commit d4bb88e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,27 +33,16 @@ const UDP = internalBinding('udp_wrap').UDP; | |||
| 33 | 33 | }, TypeError); | |
| 34 | 34 | ||
| 35 | 35 | const StreamWrapProto = Object.getPrototypeOf(TTY.prototype); | |
| 36 | + const properties = ['bytesRead', 'fd', '_externalStream']; | ||
| 36 | 37 | ||
| 37 | - // Should not throw for Object.getOwnPropertyDescriptor | ||
| 38 | - assert.strictEqual( | ||
| 39 | - typeof Object.getOwnPropertyDescriptor(StreamWrapProto, 'bytesRead'), | ||
| 40 | - 'object' | ||
| 41 | - ); | ||
| 42 | - | ||
| 43 | - assert.strictEqual( | ||
| 44 | - typeof Object.getOwnPropertyDescriptor(StreamWrapProto, 'fd'), | ||
| 45 | - 'object' | ||
| 46 | - ); | ||
| 47 | - | ||
| 48 | - assert.strictEqual( | ||
| 49 | - typeof Object.getOwnPropertyDescriptor(StreamWrapProto, '_externalStream'), | ||
| 50 | - 'object' | ||
| 51 | - ); | ||
| 52 | - | ||
| 53 | - assert.strictEqual( | ||
| 54 | - typeof Object.getOwnPropertyDescriptor(StreamWrapProto, 'fd'), | ||
| 55 | - 'object' | ||
| 56 | - ); | ||
| 38 | + properties.forEach((property) => { | ||
| 39 | + // Should not throw for Object.getOwnPropertyDescriptor | ||
| 40 | + assert.strictEqual( | ||
| 41 | + typeof Object.getOwnPropertyDescriptor(StreamWrapProto, property), | ||
| 42 | + 'object', | ||
| 43 | + 'typeof property descriptor ' + property + ' is not \'object\'' | ||
| 44 | + ); | ||
| 45 | + }); | ||
| 57 | 46 | ||
| 58 | 47 | if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check | |
| 59 | 48 | // There are accessor properties in crypto too | |
| Back | FazBrowse Home | New Git URL |
0 commit comments