Hi folks,
I would like to announce that we recently moved NodeServer classes from head_servers.js into a
sys.mjs module that is usable in xpcshell-tests anywhere in the tree.
Previously if you wanted to set up a server for your tests you probably used
httpd.sys.js which had Firefox set up a very simple HTTP server. This server lacked basic features like connection reuse and HTTPS support.
The other alternative was using moz-http2.js - which is a nodejs server implementation that is spawned by the test runner and shared state across all test runs.
Feel free to use the new servers in xpcshell tests. If you encounter any issues please file a bug blocking
Bug 1988139.
If there is interest for it, we might also extend this to work in mochitests.
Thanks!