Re-add tests deleted by mistake;
Also include new tests for server/apply-config.js
.
Hi @phyks ! I rebased your commit by hand, and added a few test cases, which caught a new issue when dealing with port=0 :). Beforehand, since port was 0, it would default to the default value silently, not throwing. My changes tweak this so that a 0 port isn't silently defaulted to another value.
Please have a look whenever you have time and feel well. Thank you!