Skip to content

Commit 7f5d4f6

Browse files
Added tests
1 parent 76d8c47 commit 7f5d4f6

File tree

6 files changed

+221
-0
lines changed

6 files changed

+221
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "function $name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: false
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: ""
13+
selections:
14+
- anchor: {line: 0, character: 0}
15+
active: {line: 0, character: 0}
16+
finalState:
17+
documentContents: |-
18+
function () {
19+
20+
}
21+
selections:
22+
- anchor: {line: 0, character: 9}
23+
active: {line: 0, character: 9}
24+
thatMark:
25+
- type: UntypedTarget
26+
contentRange:
27+
start: {line: 0, character: 0}
28+
end: {line: 2, character: 1}
29+
isReversed: false
30+
hasExplicitRange: true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "function $name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: true
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: ""
13+
selections:
14+
- anchor: {line: 0, character: 0}
15+
active: {line: 0, character: 0}
16+
marks: {}
17+
finalState:
18+
documentContents: |-
19+
function () {
20+
21+
}
22+
selections:
23+
- anchor: {line: 0, character: 9}
24+
active: {line: 0, character: 9}
25+
thatMark:
26+
- type: UntypedTarget
27+
contentRange:
28+
start: {line: 0, character: 0}
29+
end: {line: 2, character: 1}
30+
isReversed: false
31+
hasExplicitRange: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "$name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: true
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: |-
13+
class Aaa {
14+
15+
}
16+
selections:
17+
- anchor: {line: 1, character: 4}
18+
active: {line: 1, character: 4}
19+
marks: {}
20+
finalState:
21+
documentContents: |-
22+
class Aaa {
23+
() {
24+
25+
}
26+
}
27+
selections:
28+
- anchor: {line: 1, character: 4}
29+
active: {line: 1, character: 4}
30+
thatMark:
31+
- type: UntypedTarget
32+
contentRange:
33+
start: {line: 1, character: 4}
34+
end: {line: 3, character: 5}
35+
isReversed: false
36+
hasExplicitRange: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "function $name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: true
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: |-
13+
class Aaa {
14+
bbb() {
15+
16+
}
17+
}
18+
selections:
19+
- anchor: {line: 2, character: 8}
20+
active: {line: 2, character: 8}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
class Aaa {
25+
bbb() {
26+
function () {
27+
28+
}
29+
}
30+
}
31+
selections:
32+
- anchor: {line: 2, character: 17}
33+
active: {line: 2, character: 17}
34+
thatMark:
35+
- type: UntypedTarget
36+
contentRange:
37+
start: {line: 2, character: 8}
38+
end: {line: 4, character: 9}
39+
isReversed: false
40+
hasExplicitRange: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "$name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: true
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: |-
13+
function aaa() {
14+
class Bbb {
15+
16+
}
17+
}
18+
selections:
19+
- anchor: {line: 2, character: 8}
20+
active: {line: 2, character: 8}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
function aaa() {
25+
class Bbb {
26+
() {
27+
28+
}
29+
}
30+
}
31+
selections:
32+
- anchor: {line: 2, character: 8}
33+
active: {line: 2, character: 8}
34+
thatMark:
35+
- type: UntypedTarget
36+
contentRange:
37+
start: {line: 2, character: 8}
38+
end: {line: 4, character: 9}
39+
isReversed: false
40+
hasExplicitRange: true
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
languageId: typescript
2+
command:
3+
version: 6
4+
spokenForm: snippet funk
5+
action:
6+
name: insertSnippet
7+
snippetDescription: {type: custom, body: "$name($parameterList) {\n\t$body\n}"}
8+
destination: {type: implicit}
9+
usePrePhraseSnapshot: true
10+
spokenFormError: custom insertion snippet
11+
initialState:
12+
documentContents: |-
13+
class Aaa {
14+
bbb() {
15+
class Bbb {
16+
17+
}
18+
}
19+
}
20+
selections:
21+
- anchor: {line: 3, character: 12}
22+
active: {line: 3, character: 12}
23+
marks: {}
24+
finalState:
25+
documentContents: |-
26+
class Aaa {
27+
bbb() {
28+
class Bbb {
29+
() {
30+
31+
}
32+
}
33+
}
34+
}
35+
selections:
36+
- anchor: {line: 3, character: 12}
37+
active: {line: 3, character: 12}
38+
thatMark:
39+
- type: UntypedTarget
40+
contentRange:
41+
start: {line: 3, character: 12}
42+
end: {line: 5, character: 13}
43+
isReversed: false
44+
hasExplicitRange: true

0 commit comments

Comments
 (0)