Skip to content

Commit 18d504b

Browse files
Update more tests
1 parent 1774b7f commit 18d504b

21 files changed

+153
-116
lines changed

data/fixtures/recorded/actions/snippets/snipFunkAfterClass.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ command:
44
spokenForm: snippet funk after class
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription: {type: custom, body: "function $name($parameterList) {\n\t$body\n}"}
88
destination:
99
type: primitive
1010
insertionMode: after
@@ -14,6 +14,7 @@ command:
1414
- type: containingScope
1515
scopeType: {type: class}
1616
usePrePhraseSnapshot: true
17+
spokenFormError: custom insertion snippet
1718
initialState:
1819
documentContents: |-
1920
class Aaa {

data/fixtures/recorded/actions/snippets/snipFunkAfterFineAndZip.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ command:
44
spokenForm: snippet funk after fine and zip
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: after
@@ -16,6 +20,7 @@ command:
1620
- type: primitive
1721
mark: {type: decoratedSymbol, symbolColor: default, character: z}
1822
usePrePhraseSnapshot: true
23+
spokenFormError: custom insertion snippet
1924
initialState:
2025
documentContents: |-
2126
const foo = "bar";

data/fixtures/recorded/actions/snippets/snipFunkAfterMadeAndBeforeFineAndZip.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ command:
44
spokenForm: snippet funk after made and before fine and zip
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: list
1014
destinations:
@@ -23,6 +27,7 @@ command:
2327
- type: primitive
2428
mark: {type: decoratedSymbol, symbolColor: default, character: z}
2529
usePrePhraseSnapshot: true
30+
spokenFormError: custom insertion snippet
2631
initialState:
2732
documentContents: |
2833
const foo = "bar";

data/fixtures/recorded/actions/snippets/snipFunkAfterThis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ command:
44
spokenForm: snippet funk after this
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: after
1115
target:
1216
type: primitive
1317
mark: {type: cursor}
1418
usePrePhraseSnapshot: true
19+
spokenFormError: custom insertion snippet
1520
initialState:
1621
documentContents: " const foo = \"bar\";"
1722
selections:

data/fixtures/recorded/actions/snippets/snipFunkAfterThis2.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ command:
44
spokenForm: snippet funk after this
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: after
1115
target:
1216
type: primitive
1317
mark: {type: cursor}
1418
usePrePhraseSnapshot: true
19+
spokenFormError: custom insertion snippet
1520
initialState:
1621
documentContents: const foo = "bar";
1722
selections:

data/fixtures/recorded/actions/snippets/snipFunkAfterThis3.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@ command:
44
spokenForm: snippet funk after this
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: namedFunction}
12+
- {type: statement}
813
destination:
914
type: primitive
1015
insertionMode: after
1116
target:
1217
type: primitive
1318
mark: {type: cursor}
1419
usePrePhraseSnapshot: true
20+
spokenFormError: custom insertion snippet
1521
initialState:
1622
documentContents: |-
1723
function helloWorld() {

data/fixtures/recorded/actions/snippets/snipFunkAfterThis4.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ command:
44
spokenForm: snippet funk after this
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: after
1115
target:
1216
type: primitive
1317
mark: {type: cursor}
1418
usePrePhraseSnapshot: false
19+
spokenFormError: custom insertion snippet
1520
initialState:
1621
documentContents: const foo = "bar";
1722
selections:

data/fixtures/recorded/actions/snippets/snipFunkAfterZipAndBeforeFine.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ command:
44
spokenForm: snippet funk after zip and before fine
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: list
1014
destinations:
@@ -19,6 +23,7 @@ command:
1923
type: primitive
2024
mark: {type: decoratedSymbol, symbolColor: default, character: f}
2125
usePrePhraseSnapshot: true
26+
spokenFormError: custom insertion snippet
2227
initialState:
2328
documentContents: |-
2429
const foo = "bar";

data/fixtures/recorded/actions/snippets/snipFunkBeforeClass.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ command:
44
spokenForm: snippet funk before class
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: before
@@ -14,6 +18,7 @@ command:
1418
- type: containingScope
1519
scopeType: {type: class}
1620
usePrePhraseSnapshot: true
21+
spokenFormError: custom insertion snippet
1722
initialState:
1823
documentContents: |-
1924
class Aaa {

data/fixtures/recorded/actions/snippets/snipFunkBeforeThis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ command:
44
spokenForm: snippet funk before this
55
action:
66
name: insertSnippet
7-
snippetDescription: {type: named, name: functionDeclaration}
7+
snippetDescription:
8+
type: custom
9+
body: "function $name($parameterList) {\n\t$body\n}"
10+
scopeTypes:
11+
- {type: statement}
812
destination:
913
type: primitive
1014
insertionMode: before
1115
target:
1216
type: primitive
1317
mark: {type: cursor}
1418
usePrePhraseSnapshot: true
19+
spokenFormError: custom insertion snippet
1520
initialState:
1621
documentContents: const foo = "bar";
1722
selections:

0 commit comments

Comments
 (0)