mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
Snippet insertion extension API changes
- Basing snippet insertion failure on a new `_codeEditor` null-check. - Now returns `Thenable<boolean>`. - Removed vscode.proposed.d.ts copy of the `TextEditor` change. - Removing empty options interface.
This commit is contained in:
@@ -41,9 +41,8 @@ suite('editor tests', () => {
|
||||
.appendText(' snippet');
|
||||
|
||||
return withRandomFileEditor('', (editor, doc) => {
|
||||
editor.edit(snippetString);
|
||||
|
||||
return editor.edit(() => {}).then(() => {
|
||||
return editor.edit(snippetString).then(inserted => {
|
||||
assert.ok(inserted);
|
||||
assert.equal(doc.getText(), 'This is a placeholder snippet');
|
||||
assert.ok(doc.isDirty);
|
||||
});
|
||||
@@ -60,9 +59,8 @@ suite('editor tests', () => {
|
||||
new Position(0, 12)
|
||||
);
|
||||
|
||||
editor.edit(snippetString);
|
||||
|
||||
return editor.edit(() => {}).then(() => {
|
||||
return editor.edit(snippetString).then(inserted => {
|
||||
assert.ok(inserted);
|
||||
assert.equal(doc.getText(), 'This has been replaced');
|
||||
assert.ok(doc.isDirty);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user