Skip to content

Commit 876e4a4

Browse files
test(contracts): trim redundant resolved shortcut key cases
AI-assisted; verified with the tests and tools listed above.
1 parent 6f45abb commit 876e4a4

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎packages/contracts/src/keybindings.test.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,14 @@ it.effect("drops resolved rules with commands this build does not know", () =>
4141

4242
it.effect("drops malformed resolved rule entries", () =>
4343
Effect.gen(function* () {
44-
const spaceRule = { command: "terminal.split" as const, shortcut: { ...shortcut, key: " " } };
4544
const validRules = [
4645
{ command: "terminal.toggle" as const, shortcut },
47-
spaceRule,
48-
...["+", "escape"].map((key) => ({
49-
command: "terminal.toggle" as const,
50-
shortcut: { ...shortcut, key },
51-
})),
46+
{ command: "terminal.split" as const, shortcut: { ...shortcut, key: " " } },
5247
];
5348
const parsed = yield* decode(ResolvedKeybindingsConfig, [
5449
"garbage",
5550
...validRules,
56-
...["", " ", "\t", " a", "a "].map((key) => ({
51+
...["", "\t", " a", "a "].map((key) => ({
5752
command: "terminal.toggle",
5853
shortcut: { ...shortcut, key },
5954
})),

0 commit comments

Comments
 (0)