Skip to content

Commit 73b2437

Browse files
Added more tests
1 parent e8ef581 commit 73b2437

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

cursorless-talon-dev/src/cursorless_test.talon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ test api extract decorated marks <user.cursorless_target>:
3232
test api alternate highlight nothing:
3333
user.private_cursorless_test_alternate_highlight_nothing()
3434

35-
test api parsed: user.cursorless_x_custom_command("chuck block")
35+
test api parsed chuck block: user.cursorless_x_custom_command("chuck block")
36+
test api parsed take next token: user.cursorless_x_custom_command("take next token")
37+
test api parsed change next instance: user.cursorless_x_custom_command("change next instance")
3638
test api parsed <user.cursorless_target>:
3739
user.cursorless_x_custom_command("chuck block <target>", cursorless_target)
3840
test api parsed <user.cursorless_target> plus <user.cursorless_target>:

packages/cursorless-engine/src/test/fixtures/talonApi.fixture.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ function getTextAction(options: GetTextActionOptions): ActionDescriptor {
120120
};
121121
}
122122

123-
const parsedActionNoTargets: ActionDescriptor = {
124-
name: "parsed",
125-
content: "chuck block",
126-
arguments: [],
127-
};
123+
function parsedAction(content: string): ActionDescriptor {
124+
return {
125+
name: "parsed",
126+
content,
127+
arguments: [],
128+
};
129+
}
130+
128131
const parsedActionAir: ActionDescriptor = {
129132
name: "parsed",
130133
content: "chuck block <target>",
@@ -221,7 +224,15 @@ export const talonApiFixture = [
221224
"test api alternate highlight nothing",
222225
alternateHighlightNothingAction,
223226
),
224-
spokenFormTest("test api parsed", parsedActionNoTargets),
227+
spokenFormTest("test api parsed chuck block", parsedAction("chuck block")),
228+
spokenFormTest(
229+
"test api parsed take next token",
230+
parsedAction("take next token"),
231+
),
232+
spokenFormTest(
233+
"test api parsed change next instance",
234+
parsedAction("change next instance"),
235+
),
225236
spokenFormTest("test api parsed air and bat", parsedActionAir),
226237
spokenFormTest("test api parsed air plus bat", parsedActionAirPlusBat),
227238
];

0 commit comments

Comments
 (0)