Skip to content

Commit

Permalink
[squash] fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed May 3, 2017
1 parent 6ef674f commit a9e1bba
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/parallel/test-stream-base-typechecking.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');
const net = require('net');

assert.throws(() => {
process.stdout.write('broken', 'buffer');
}, /^TypeError: Second argument must be a buffer$/);
const server = net.createServer().listen(0, common.mustCall(() => {
const client = net.connect(server.address().port, common.mustCall(() => {
assert.throws(() => {
client.write('broken', 'buffer');
}, /^TypeError: Second argument must be a buffer$/);
client.destroy();
server.close();
}));
}));

0 comments on commit a9e1bba

Please sign in to comment.