2015-09-13 19:49:35 -07:00
|
|
|
'use strict';
|
2017-08-12 00:02:15 +03:00
|
|
|
const common = require('../common');
|
2015-09-13 19:49:35 -07:00
|
|
|
const assert = require('assert');
|
|
|
|
const net = require('net');
|
|
|
|
|
2017-04-22 11:07:32 -07:00
|
|
|
assert.throws(function() { net.createServer('path'); },
|
2017-08-12 00:02:15 +03:00
|
|
|
common.expectsError({
|
|
|
|
code: 'ERR_INVALID_ARG_TYPE',
|
|
|
|
type: TypeError
|
|
|
|
}));
|
|
|
|
|
2017-04-22 11:07:32 -07:00
|
|
|
assert.throws(function() { net.createServer(0); },
|
2017-08-12 00:02:15 +03:00
|
|
|
common.expectsError({
|
|
|
|
code: 'ERR_INVALID_ARG_TYPE',
|
|
|
|
type: TypeError
|
|
|
|
}));
|