diff options
Diffstat (limited to 'test/parallel/test-http2-createsecureserver-nooptions.js')
-rw-r--r-- | test/parallel/test-http2-createsecureserver-nooptions.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/parallel/test-http2-createsecureserver-nooptions.js b/test/parallel/test-http2-createsecureserver-nooptions.js index 71764f5783..767797febc 100644 --- a/test/parallel/test-http2-createsecureserver-nooptions.js +++ b/test/parallel/test-http2-createsecureserver-nooptions.js @@ -4,19 +4,19 @@ const common = require('../common'); if (!common.hasCrypto) common.skip('missing crypto'); +const assert = require('assert'); const http2 = require('http2'); -const invalidOptions = [() => {}, 1, 'test', null]; -const invalidArgTypeError = { - type: TypeError, - code: 'ERR_INVALID_ARG_TYPE', - message: 'The "options" argument must be of type Object' -}; - // Error if options are not passed to createSecureServer +const invalidOptions = [() => {}, 1, 'test', null]; invalidOptions.forEach((invalidOption) => { - common.expectsError( + assert.throws( () => http2.createSecureServer(invalidOption), - invalidArgTypeError + { + name: 'TypeError [ERR_INVALID_ARG_TYPE]', + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options" argument must be of type Object. Received ' + + `type ${typeof invalidOption}` + } ); }); |