Support untitled with associated resource in vscode.open (#139194)

* wip

* 💄

* add test

* comments

* skip flaky test

* Revert "skip flaky test"

This reverts commit 94c712500e.
This commit is contained in:
Benjamin Pasero
2021-12-15 14:38:07 +01:00
committed by GitHub
parent 9df559fdbb
commit 8f7589750a
2 changed files with 30 additions and 5 deletions

View File

@@ -116,4 +116,12 @@ suite('vscode API - commands', () => {
return Promise.all([a, b, c, d]);
});
test('api-command: vscode.open with untitled supports associated resource (#138925)', async function () {
let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/far-copy.js').with({ scheme: 'untitled' });
await commands.executeCommand('vscode.open', uri).then(() => assert.ok(true), () => assert.ok(false));
// untitled with associated resource are dirty from the beginning
assert.ok(window.activeTextEditor?.document.isDirty);
});
});