mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-30 08:40:29 -04:00
Fix debounce issue when book toc is updated (#14392)
* pass function to debounce * remove debounce decorator and move watch methods to bookmodel * Move the vscode tree change data event to book model * address pr comments * fix book tests
This commit is contained in:
@@ -485,14 +485,14 @@ describe('BooksTreeViewTests', function () {
|
||||
|
||||
if (run.it === 'v1') {
|
||||
it('should ignore toc.yml files not in _data folder', async () => {
|
||||
await bookTreeViewProvider.currentBook.readBookStructure(rootFolderPath);
|
||||
await bookTreeViewProvider.currentBook.readBookStructure();
|
||||
await bookTreeViewProvider.currentBook.loadTableOfContentFiles();
|
||||
let path = bookTreeViewProvider.currentBook.tableOfContentsPath;
|
||||
should(vscode.Uri.file(path).fsPath).equal(vscode.Uri.file(run.folderPaths.tableOfContentsFile).fsPath);
|
||||
});
|
||||
} else if (run.it === 'v2') {
|
||||
it('should ignore toc.yml files not under the root book folder', async () => {
|
||||
await bookTreeViewProvider.currentBook.readBookStructure(rootFolderPath);
|
||||
await bookTreeViewProvider.currentBook.readBookStructure();
|
||||
await bookTreeViewProvider.currentBook.loadTableOfContentFiles();
|
||||
let path = bookTreeViewProvider.currentBook.tableOfContentsPath;
|
||||
should(vscode.Uri.file(path).fsPath).equal(vscode.Uri.file(run.folderPaths.tableOfContentsFile).fsPath);
|
||||
|
||||
Reference in New Issue
Block a user