Add Hyprland skill and configuration files; enhance installation process with GPU detection and SDDM support
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert";
|
||||
import { groups, packages, toDirs } from "../src/packages.js";
|
||||
|
||||
test("toDirs maps a package name to its dir when set", () => {
|
||||
assert.deepStrictEqual(toDirs(["rofi-wayland"]), ["rofi"]);
|
||||
});
|
||||
|
||||
test("toDirs falls back to the package name when no dir is set", () => {
|
||||
assert.deepStrictEqual(toDirs(["waybar", "kitty"]), ["waybar", "kitty"]);
|
||||
});
|
||||
|
||||
test("toDirs falls back to the raw name for unknown packages", () => {
|
||||
assert.deepStrictEqual(toDirs(["not-a-real-package"]), ["not-a-real-package"]);
|
||||
});
|
||||
|
||||
test("groups contains exactly the distinct group values declared on packages, no duplicates", () => {
|
||||
const expected = [...new Set(packages.filter((p) => p.group).map((p) => p.group!))];
|
||||
assert.deepStrictEqual(groups, expected);
|
||||
assert.strictEqual(new Set(groups).size, groups.length, "groups should have no duplicates");
|
||||
});
|
||||
|
||||
test("every grouped package's group appears in the groups list", () => {
|
||||
for (const pkg of packages.filter((p) => p.group)) {
|
||||
assert.ok(groups.includes(pkg.group!), `${pkg.name}'s group "${pkg.group}" missing from groups`);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user