mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
Fix open notebook bug (#10930)
* Fix open notebook bug * cleanup * clean up spaces
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user