api tests: avoid rootPath

This commit is contained in:
Martin Aeschlimann
2019-03-20 17:41:00 +01:00
parent f41af4f525
commit 5f09de6e7a

View File

@@ -75,7 +75,7 @@ suite('workspace-namespace', () => {
});
test('openTextDocument, untitled is dirty', function () {
return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './newfile.txt'))).then(doc => {
return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.workspaceFolders![0].uri.toString() || '', './newfile.txt'))).then(doc => {
assert.equal(doc.uri.scheme, 'untitled');
assert.ok(doc.isDirty);
});