mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
fix #37484
This commit is contained in:
@@ -56,6 +56,22 @@ suite('commands namespace tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('command with return-value', function () {
|
||||
|
||||
let registration = commands.registerCommand('t1', function () {
|
||||
return new Set<number>().add(1).add(2);
|
||||
});
|
||||
|
||||
return commands.executeCommand('t1', 'start').then(value => {
|
||||
registration.dispose();
|
||||
|
||||
assert.ok(value instanceof Set);
|
||||
assert.equal((<Set<number>>value).size, 2);
|
||||
assert.equal((<Set<number>>value).has(1), true);
|
||||
assert.equal((<Set<number>>value).has(2), true);
|
||||
});
|
||||
});
|
||||
|
||||
test('editorCommand with extra args', function () {
|
||||
|
||||
let args: IArguments;
|
||||
@@ -134,4 +150,4 @@ suite('commands namespace tests', () => {
|
||||
|
||||
return Promise.all([a, b, c, d]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user