mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
WinJS.Promise#as is not what you think it is, use wrap instead - fixes #11754
This commit is contained in:
@@ -232,6 +232,20 @@ suite('window namespace tests', () => {
|
||||
return result;
|
||||
});
|
||||
|
||||
test('showQuickPick, native promise - #11754', function () {
|
||||
|
||||
const data = new Promise<string[]>(resolve => {
|
||||
resolve(['a', 'b', 'c']);
|
||||
});
|
||||
|
||||
const source = new CancellationTokenSource();
|
||||
const result = window.showQuickPick(data, undefined, source.token);
|
||||
source.cancel();
|
||||
return result.then(value => {
|
||||
assert.equal(value, undefined);
|
||||
});
|
||||
});
|
||||
|
||||
test('editor, selection change kind', () => {
|
||||
return workspace.openTextDocument(join(workspace.rootPath, './far.js')).then(doc => window.showTextDocument(doc)).then(editor => {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user