Pinning Notebooks on Notebooks view (#11963)

* initial commit

* added tests

* code cleanup and more tests

* add missed util test

* changes to address comments

* remove pin from resources
This commit is contained in:
Maddy
2020-08-31 08:53:11 -07:00
committed by GitHub
parent b4a3325a21
commit ae830d9e64
15 changed files with 506 additions and 26 deletions

View File

@@ -327,4 +327,22 @@ describe('Utils Tests', function () {
}
});
});
describe('isBookItemPinned', function (): void {
it('Should NOT pin an unknown book within a workspace', async function (): Promise<void> {
let notebookUri = path.join(path.sep, 'randomfolder', 'randomsubfolder', 'content', 'randomnotebook.ipynb');
let isNotebookPinned = utils.isBookItemPinned(notebookUri);
should(isNotebookPinned).be.false('Random notebooks should not be pinned');
});
});
describe('getPinnedNotebooks', function (): void {
it('Should NOT have any pinned notebooks', async function (): Promise<void> {
let pinnedNotebooks: string[] = utils.getPinnedNotebooks();
should(pinnedNotebooks.length).equal(0, 'Should not have any pinned notebooks');
});
});
});