(expectedUri: vs.Uri, expectedPosition: vs.Position)
| 945 | } |
| 946 | |
| 947 | export async function checkCurrentEditorSelectionIsPosition(expectedUri: vs.Uri, expectedPosition: vs.Position): Promise<boolean> { |
| 948 | const editor = currentEditor(); |
| 949 | return fsPath(editor.document.uri) === fsPath(expectedUri) |
| 950 | && editor.selection.start.line === expectedPosition.line |
| 951 | && editor.selection.start.character === expectedPosition.character |
| 952 | && editor.selection.end.line === expectedPosition.line |
| 953 | && editor.selection.end.character === expectedPosition.character; |
| 954 | } |
| 955 | |
| 956 | export function snippetValue(text: string | vs.SnippetString | undefined) { |
| 957 | return !text || typeof text === "string" ? text : text.value; |
no test coverage detected