Fix open notebook bug (#10930)

* Fix open notebook bug

* cleanup

* clean up spaces
This commit is contained in:
Charles Gagnon
2020-06-16 13:06:44 -07:00
committed by GitHub
parent 381a747b62
commit 94bc0d9559
9 changed files with 213 additions and 169 deletions

View File

@@ -160,7 +160,7 @@ describe('Utils Tests', function () {
});
describe('isEditorTitleFree', () => {
afterEach( async () => {
afterEach(async () => {
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
});
@@ -318,4 +318,17 @@ describe('Utils Tests', function () {
}).throw();
});
});
describe('getRandomToken', function (): void {
it('Should have default length and be hex only', async function (): Promise<void> {
let token = await utils.getRandomToken();
should(token).have.length(48);
let validChars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
for (let i = 0; i < token.length; i++) {
let char = token.charAt(i);
should(validChars.indexOf(char)).be.greaterThan(-1);
}
});
});
});