~james/core

core/web/src/lib/components/ui/keyLabels.test.ts -rw-r--r-- 394 bytes
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 15 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
import { describe, expect, it } from "vitest";
import { keyLabel } from "#lib/components/ui/keyLabels.ts";

describe("keyLabel", () => {
	it("uses symbols on a mac and words elsewhere", () => {
		expect(keyLabel("shift", true)).toBe("⇧");
		expect(keyLabel("enter", true)).toBe("⏎");
		expect(keyLabel("mod", false)).toBe("Ctrl");
		expect(keyLabel("enter", false)).toBe("Enter");
	});
});