mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 07:33:12 +09:00
Remove one research queue entry per level a technology sync unlocks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ed1e4ee3cb
commit
f7c78d9f74
2 files changed
+29
-6
No files matched your search
@@ -119,6 +119,23 @@ describe("research_sync controller", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("technology sync unlocking several levels", function() {
|
||||
const techSync = (name, level, researched) => mock.getHandler(controller, SyncTechnologiesRequest)(
|
||||
new SyncTechnologiesRequest([new TechnologySync(name, level, null, researched)]), src
|
||||
);
|
||||
it("should drop one entry per level unlocked on a known technology", async function() {
|
||||
await techSync("m", 4, true);
|
||||
await update(["m", "m", "m", "x"]);
|
||||
await techSync("m", 7, true);
|
||||
assert.deepEqual(await sync(), ["x"]);
|
||||
});
|
||||
it("should drop one entry per level unlocked on a new technology", async function() {
|
||||
await update(["m", "m", "x"]);
|
||||
await techSync("m", 2, true);
|
||||
assert.deepEqual(await sync(), ["x"]);
|
||||
});
|
||||
});
|
||||
|
||||
it("should persist the queue across loads", async function() {
|
||||
await update(["a", "b"]);
|
||||
await controller.hooks.save.invoke();
|
||||
|
||||
Reference in new issue
Block a user