api-tests: avoid rootPath

This commit is contained in:
Martin Aeschlimann
2019-03-20 17:28:36 +01:00
parent e16115a0c3
commit 9e984cd673

View File

@@ -105,7 +105,7 @@ suite('commands namespace tests', () => {
});
test('api-command: vscode.open', function () {
let uri = Uri.file(join(workspace.rootPath || '', './image.png'));
let uri = Uri.parse(workspace.workspaceFolders![0].uri.toString() + '/image.png');
let a = commands.executeCommand('vscode.open', uri).then(() => assert.ok(true), () => assert.ok(false));
let b = commands.executeCommand('vscode.open', uri, ViewColumn.Two).then(() => assert.ok(true), () => assert.ok(false));
let c = commands.executeCommand('vscode.open').then(() => assert.ok(false), () => assert.ok(true));