Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
rexagod committed May 23, 2020
1 parent 26efdc5 commit eb1dffc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/parallel/test-http-outgoing-end-types.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const http = require('http');

const httpServer = http.createServer(common.mustCall(function(req, res) {
httpServer.close();
assert.throws(() => {
res.end(['Throws.']);
}, {
code: 'ERR_INVALID_ARG_TYPE'
});
res.end();
}));

httpServer.listen(0, common.mustCall(function() {
http.get({ port: this.address().port });
}));

0 comments on commit eb1dffc

Please sign in to comment.