| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4825786 commit ea0cfc9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,3 +71,21 @@ const assert = require('assert'); | |||
| 71 | 71 | })); | |
| 72 | 72 | })); | |
| 73 | 73 | } | |
| 74 | + | ||
| 75 | + { | ||
| 76 | + const server = createServer(); | ||
| 77 | + server.listen(0, mustCall(() => { | ||
| 78 | + const port = server.address().port; | ||
| 79 | + const url = `http://localhost:${port}`; | ||
| 80 | + const client = connect(url, mustCall(() => { | ||
| 81 | + client.request(); | ||
| 82 | + })); | ||
| 83 | + | ||
| 84 | + server.once('request', mustCall((request, response) => { | ||
| 85 | + response.destroy(); | ||
| 86 | + assert.strictEqual(response.write('asd', mustNotCall()), false); | ||
| 87 | + client.destroy(); | ||
| 88 | + server.close(); | ||
| 89 | + })); | ||
| 90 | + })); | ||
| 91 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments