mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 17:24:01 -05:00
Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd * fix issues with merges * bump node version in azpipe * replace license headers * remove duplicate launch task * fix build errors * fix build errors * fix tslint issues * working through package and linux build issues * more work * wip * fix packaged builds * working through linux build errors * wip * wip * wip * fix mac and linux file limits * iterate linux pipeline * disable editor typing * revert series to parallel * remove optimize vscode from linux * fix linting issues * revert testing change * add work round for new node * readd packaging for extensions * fix issue with angular not resolving decorator dependencies
This commit is contained in:
35
src/vs/base/test/node/keytar.test.ts
Normal file
35
src/vs/base/test/node/keytar.test.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
|
||||
suite('Keytar', () => {
|
||||
|
||||
test('loads and is functional', function (done) {
|
||||
if (platform.isLinux) {
|
||||
// Skip test due to set up issue with Travis.
|
||||
this.skip();
|
||||
return;
|
||||
}
|
||||
(async () => {
|
||||
const keytar = await import('keytar');
|
||||
const name = `VSCode Test ${Math.floor(Math.random() * 1e9)}`;
|
||||
try {
|
||||
await keytar.setPassword(name, 'foo', 'bar');
|
||||
assert.equal(await keytar.getPassword(name, 'foo'), 'bar');
|
||||
await keytar.deletePassword(name, 'foo');
|
||||
assert.equal(await keytar.getPassword(name, 'foo'), undefined);
|
||||
} catch (err) {
|
||||
// try to clean up
|
||||
try {
|
||||
await keytar.deletePassword(name, 'foo');
|
||||
} finally {
|
||||
// tslint:disable-next-line: no-unsafe-finally
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
})().then(done, done);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user