• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3if (!common.hasCrypto)
4  common.skip('missing crypto');
5
6const assert = require('assert');
7const tls = require('tls');
8
9['fhqwhgads', 42, {}, []].forEach((testValue) => {
10  assert.throws(
11    () => { tls.createServer({ SNICallback: testValue }); },
12    { code: 'ERR_INVALID_ARG_TYPE', message: /\boptions\.SNICallback\b/ }
13  );
14});
15