We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e3a0d7 commit 0b34c4fCopy full SHA for 0b34c4f
test/parallel/test-http-outgoing-end-types.js
@@ -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
0 commit comments