diff --git a/netwerk/test/unit/test_trr.js b/netwerk/test/unit/test_trr.js index a5ff02a4d203..e0bd5ce1a14b 100644 --- a/netwerk/test/unit/test_trr.js +++ b/netwerk/test/unit/test_trr.js @@ -1,5 +1,6 @@ "use strict"; +const { NodeServer } = ChromeUtils.import("resource://testing-common/httpd.js"); const dns = Cc["@mozilla.org/network/dns-service;1"].getService( Ci.nsIDNSService ); @@ -140,6 +141,17 @@ class DNSListener { } } +add_task(async function test0_nodeExecute() { + // This test checks that moz-http2.js running in node is working. + // This should always be the first test in this file (except for setup) + // otherwise we may encounter random failures when the http2 server is down. + equal( + await NodeServer.execute(`"hello"`), + "hello", + "Check that moz-http2.js is running" + ); +}); + // verify basic A record add_task(async function test1() { dns.clearCache(true);