mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Create directory when adding a book section from book tree view (#18966)
* create folder when creating a book section * fix test
This commit is contained in:
@@ -576,8 +576,7 @@ describe('BookTocManagerTests', function () {
|
||||
bookTocManager = new BookTocManager(sourceBookModel);
|
||||
const fileBasename = `addSectionTest-${generateGuid()}`;
|
||||
const sectionTitle = 'Section Test';
|
||||
const testFilePath = path.join(run.sectionA.contentFolder, 'sectionA', fileBasename).concat(FileExtension.Markdown);
|
||||
await fs.writeFile(testFilePath, '');
|
||||
const testFilePath = path.join(run.sectionA.contentFolder, 'sectionA', sectionTitle,fileBasename).concat(FileExtension.Markdown);
|
||||
const pathDetails = new TocEntryPathHandler(testFilePath, run.sourceBook.root, sectionTitle);
|
||||
await bookTocManager.addNewTocEntry(pathDetails, sectionA, true);
|
||||
let toc: JupyterBookSection[] = yaml.safeLoad((await fs.promises.readFile(run.sourceBook.tocPath)).toString());
|
||||
|
||||
Reference in New Issue
Block a user