| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7dc28ab commit 8def934
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + const common = require('../common'); | ||
| 3 | + const assert = require('assert'); | ||
| 4 | + const http = require('http'); | ||
| 5 | + | ||
| 6 | + const httpServer = http.createServer(common.mustCall(function(req, res) { | ||
| 7 | + httpServer.close(); | ||
| 8 | + assert.throws(() => { | ||
| 9 | + res.end(['Throws.']); | ||
| 10 | + }, { | ||
| 11 | + code: 'ERR_INVALID_ARG_TYPE' | ||
| 12 | + }); | ||
| 13 | + res.end(); | ||
| 14 | + })); | ||
| 15 | + | ||
| 16 | + httpServer.listen(0, common.mustCall(function() { | ||
| 17 | + http.get({ port: this.address().port }); | ||
| 18 | + })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments