mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
828 B
45 lines
828 B
7 years ago
|
'use strict';
|
||
|
|
||
|
const common = require('../common');
|
||
|
if (!common.hasCrypto)
|
||
|
common.skip('missing crypto');
|
||
|
|
||
|
const http2 = require('http2');
|
||
|
|
||
|
// Error if options are not passed to createSecureServer
|
||
|
|
||
|
common.expectsError(
|
||
|
() => http2.createSecureServer(),
|
||
|
{
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
type: TypeError
|
||
|
});
|
||
|
|
||
|
common.expectsError(
|
||
|
() => http2.createSecureServer(() => {}),
|
||
|
{
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
type: TypeError
|
||
|
});
|
||
|
|
||
|
common.expectsError(
|
||
|
() => http2.createSecureServer(1),
|
||
|
{
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
type: TypeError
|
||
|
});
|
||
|
|
||
|
common.expectsError(
|
||
|
() => http2.createSecureServer('test'),
|
||
|
{
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
type: TypeError
|
||
|
});
|
||
|
|
||
|
common.expectsError(
|
||
|
() => http2.createSecureServer(null),
|
||
|
{
|
||
|
code: 'ERR_INVALID_ARG_TYPE',
|
||
|
type: TypeError
|
||
|
});
|