11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciif (!common.hasCrypto) 41cb0ef41Sopenharmony_ci common.skip('missing crypto'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst assert = require('assert'); 71cb0ef41Sopenharmony_ciconst tls = require('tls'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci['fhqwhgads', 42, {}, []].forEach((testValue) => { 101cb0ef41Sopenharmony_ci assert.throws( 111cb0ef41Sopenharmony_ci () => { tls.createServer({ SNICallback: testValue }); }, 121cb0ef41Sopenharmony_ci { code: 'ERR_INVALID_ARG_TYPE', message: /\boptions\.SNICallback\b/ } 131cb0ef41Sopenharmony_ci ); 141cb0ef41Sopenharmony_ci}); 15