Merge pull request #1225 from bbassie/chore/drop-maintenance-node

Test only the oldest and latest supported Node.js in CI
This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-11-18 11:11:16 +00:00
commit 35f9609865
5 files changed
+30 -13

No files matched your search

+22
View File
@@ -273,6 +273,28 @@ describe("host/server", function() {
});
});
describe("._watchWhitelist()", function() {
it("should emit the added and removed players on change", async function() {
const whitelistPath = path.join(writePath, "server-whitelist.json");
await fs.mkdir(writePath, { recursive: true });
await fs.writeFile(whitelistPath, JSON.stringify(["a", "b"]));
server.enableWhitelist = true;
server._whitelist = new Set(["a", "b"]);
server._watchWhitelist();
try {
const waiter = events.once(server, "whitelist-change");
await fs.writeFile(whitelistPath, JSON.stringify(["b", "c", "c"]));
const [added, removed] = await waiter;
assert.deepEqual(added, ["c"]);
assert.deepEqual(removed, ["a"]);
assert.deepEqual([...server._whitelist], ["b", "c"]);
} finally {
server._whitelistWatcher?.close();
server.enableWhitelist = false;
}
});
});
describe(".fromOptions()", function() {
it("should resolve the requested version", async function() {
const found = await hostServer.FactorioServer.fromOptions(