mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
add ignoreIfExists-option #10659
This commit is contained in:
@@ -682,4 +682,12 @@ suite('workspace-namespace', () => {
|
||||
// todo@ben
|
||||
// assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), '');
|
||||
});
|
||||
|
||||
test('WorkspaceEdit: create & ignoreIfExists', async function () {
|
||||
let docUri = await createRandomFile('before');
|
||||
let we = new vscode.WorkspaceEdit();
|
||||
we.createFile(docUri, { ignoreIfExists: true });
|
||||
assert.ok(await vscode.workspace.applyEdit(we));
|
||||
assert.equal((await vscode.workspace.openTextDocument(docUri)).getText(), 'before');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user