Files
DankMaterialShell/quickshell/tests/window-rule-merge.test.mjs
purian23 2747a75198 hyprland: bring up features parity overhaul w/0.56+ and upcoming stable releases
- new blur variants, glow, wobble, motion blur and groupbar support
- new inputs support for mouse, touchpad and keyboard settings
- greeter, cheatsheet and scroll capture dispatch in Lua
- scrolling workspace screenshot focus fix
- fix scrolling screenshots from being cut-off on fractional-scale displays
- workspaces are keyed by address on the beta branch and upcoming stable release where named workspaces have no id
- bind flags, per-device binds, new window-rule keys and effects
- outputs default to preferred/auto/auto and gate HDR/VRR on hardwareDetails
- new dms setup/installer systemd session support on hyprland-session.target
2026-10-09 05:14:55 -04:00

26 lines
930 B
JavaScript

import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import vm from "node:vm";
import test from "node:test";
const context = vm.createContext({});
vm.runInContext(readFileSync(new URL("../Common/WindowRuleMerge.js", import.meta.url), "utf8").replace(/^\.pragma.*$/m, ""), context);
const plain = value => JSON.parse(JSON.stringify(value));
test("an edit keeps fields the editor does not own and clears the ones it does", () => {
const stored = {
"idleinhibit": "focus",
"forcergbx": true,
"focusRingColor": "#ff0000",
"noGlow": true,
"opacity": 0.5
};
assert.deepEqual(plain(context.carry(stored, ["noGlow", "opacity", "monitor"])), {
"idleinhibit": "focus",
"forcergbx": true,
"focusRingColor": "#ff0000"
});
assert.equal(stored.noGlow, true);
assert.deepEqual(plain(context.carry(null, ["opacity"])), {});
});