Use startHTTPServer() in FeedReader test

This commit is contained in:
Dan Stillman 2024-04-20 06:12:53 -04:00
parent 9ffb430207
commit 704d90cd83

View file

@ -254,13 +254,11 @@ describe("Zotero.FeedReader", function () {
describe("Legacy text encodings", function () { describe("Legacy text encodings", function () {
var httpd; var httpd;
var port = 16213; var port;
var baseURL = `http://127.0.0.1:${port}/`; var baseURL;
before(function () { before(async function () {
Cu.import("resource://zotero-unit/httpd.js"); ({ httpd, port, baseURL } = await startHTTPServer());
httpd = new HttpServer();
httpd.start(port);
httpd._handler._mimeMappings.rss = "text/xml; charset=ISO-8859-1"; httpd._handler._mimeMappings.rss = "text/xml; charset=ISO-8859-1";