aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/monitors/test_mon.js
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/monitors/test_mon.js')
-rw-r--r--desktop/modules/monitors/test_mon.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/modules/monitors/test_mon.js b/desktop/modules/monitors/test_mon.js
index 5d28ce4..f101dc7 100644
--- a/desktop/modules/monitors/test_mon.js
+++ b/desktop/modules/monitors/test_mon.js
@@ -17,7 +17,7 @@ const fs = require("fs");
const assert = require("assert");
const src = fs.readFileSync(__dirname + "/Mon.js", "utf8").replace(/^\.pragma library$/m, "");
-const M = new Function(src + "\nreturn { modes, current, draft, size, xy, lua, file, snap, AUTO };")();
+const M = new Function(src + "\nreturn { modes, current, draft, size, xy, lua, file, snap, managed, AUTO };")();
// Duplicates collapse, order kept, the Hz suffix dropped.
assert.deepStrictEqual(M.modes(["1920x1080@60.00Hz", "1920x1080@120.00Hz", "1920x1080@120.00Hz", "1280x720@60.00Hz"]),
@@ -44,6 +44,10 @@ assert.deepStrictEqual(M.size("2560x1440@60.00", "2", 7), { w: 720, h: 1280 });
// A scale mid-typing draws at 1 rather than Infinity or NaN.
assert.deepStrictEqual(M.size("1920x1080@60.00", "", 0), { w: 1920, h: 1080 });
+// A virtual output is left out, a real one kept.
+assert.deepStrictEqual(M.managed([asus, { name: "TAB", make: "", model: "" }]).map(m => m.name),
+ ["DP-3"]);
+
// Exact positions parse, auto ones fall back to where Hyprland put it.
assert.deepStrictEqual(M.xy({ position: "-1080x-960", x: 0, y: 0 }), { x: -1080, y: -960 });
assert.deepStrictEqual(M.xy({ position: "auto-center-left", x: 5, y: 6 }), { x: 5, y: 6 });