import test from "node:test"; import assert from "node:assert/strict"; import { diffSettings } from "../../shared/definitions/worldSettings.js"; test("settings diffs only mention keys that actually changed", () => { const { bullets, changed } = diffSettings( { walkTilesPerSecond: 2, nightDarkness: 0.72 }, { walkTilesPerSecond: 3, nightDarkness: 0.72, extra: 1 } ); assert.deepEqual(changed, { walkTilesPerSecond: 3 }); assert.equal(bullets.length, 1); assert.match(bullets[0], /Walk speed/); assert.match(bullets[0], /2/); assert.match(bullets[0], /3/); });