test: make test-http(s)-set-timeout-server alike (2)
Make test-http(s)-set-timeout-server tests more similar and resolve the following issues:
-
test-http-set-timeout-server.js
was missing the check toif (!common.hasCrypto())
. -
test-https-set-timeout-server.js
was missing someassert
statements, including withhttp
module -
Both files were missing some calls to
common.mustCall()
-
Both files were calling
createServer()
in different ways
Fixes: #13588 (closed) Refs: #13625
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines