mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Added unit test for books getChildren() method (#6602)
* started unit tests for books * added first unit test for getchildren() * fixed dependencies and use tmpdir * latest from master
This commit is contained in:
@@ -100,6 +100,14 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
}
|
||||
}
|
||||
|
||||
public get title(): string {
|
||||
return this.book.title;
|
||||
}
|
||||
|
||||
public get uri(): string {
|
||||
return this._uri;
|
||||
}
|
||||
|
||||
public get root(): string {
|
||||
return this.book.root;
|
||||
}
|
||||
@@ -128,4 +136,4 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
return array.reduce((acc, val) => Array.isArray(val.sections) ? acc.concat(val).concat(this.flattenArray(val.sections)) : acc.concat(val), []);
|
||||
}
|
||||
|
||||
private getBooks(): BookTreeItem[] {
|
||||
public getBooks(): BookTreeItem[] {
|
||||
let books: BookTreeItem[] = [];
|
||||
for (let i in this._tableOfContentsPath) {
|
||||
let root = path.dirname(path.dirname(this._tableOfContentsPath[i]));
|
||||
|
||||
Reference in New Issue
Block a user