Provide API to get access to the workspace configuration file (#37421) (#72490)

* Provide API to get access to the workspace configuration file (#37421)

* fix untitled ID

* update docs
This commit is contained in:
Benjamin Pasero
2019-04-17 14:24:10 +02:00
committed by GitHub
parent 2335966361
commit c72cfe0c65
10 changed files with 114 additions and 24 deletions

View File

@@ -36,12 +36,14 @@ suite('workspace-namespace', () => {
});
test('rootPath', () => {
if (vscode.workspace.rootPath) {
assert.ok(pathEquals(vscode.workspace.rootPath, join(__dirname, '../../testWorkspace')));
}
assert.ok(pathEquals(vscode.workspace.rootPath!, join(__dirname, '../../testWorkspace')));
assert.throws(() => (vscode.workspace as any).rootPath = 'farboo');
});
test('workspaceFile', () => {
assert.ok(!vscode.workspace.workspaceFile);
});
test('workspaceFolders', () => {
if (vscode.workspace.workspaceFolders) {
assert.equal(vscode.workspace.workspaceFolders.length, 1);