| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b8ccf30 commit 16f60ce
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + // Test that the setter for http.IncomingMessage,prototype.connection sets the | ||
| 4 | + // socket property too. | ||
| 5 | + require('../common'); | ||
| 6 | + | ||
| 7 | + const assert = require('assert'); | ||
| 8 | + const http = require('http'); | ||
| 9 | + | ||
| 10 | + const incomingMessage = new http.IncomingMessage(); | ||
| 11 | + | ||
| 12 | + assert.strictEqual(incomingMessage.connection, undefined); | ||
| 13 | + assert.strictEqual(incomingMessage.socket, undefined); | ||
| 14 | + | ||
| 15 | + incomingMessage.connection = 'fhqwhgads'; | ||
| 16 | + | ||
| 17 | + assert.strictEqual(incomingMessage.connection, 'fhqwhgads'); | ||
| 18 | + assert.strictEqual(incomingMessage.socket, 'fhqwhgads'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments