mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 09:38:38 +01:00
integration tests - use async test (#120225)
This commit is contained in:
@@ -13,33 +13,26 @@ suite('vscode API - commands', () => {
|
||||
|
||||
teardown(assertNoRpc);
|
||||
|
||||
test('getCommands', function (done) {
|
||||
test('getCommands', async function () {
|
||||
|
||||
let p1 = commands.getCommands().then(commands => {
|
||||
let hasOneWithUnderscore = false;
|
||||
for (let command of commands) {
|
||||
if (command[0] === '_') {
|
||||
hasOneWithUnderscore = true;
|
||||
break;
|
||||
}
|
||||
let cmds = await commands.getCommands();
|
||||
let hasOneWithUnderscore = false;
|
||||
for (let command of cmds) {
|
||||
if (command[0] === '_') {
|
||||
hasOneWithUnderscore = true;
|
||||
break;
|
||||
}
|
||||
assert.ok(hasOneWithUnderscore);
|
||||
}, done);
|
||||
}
|
||||
assert.ok(hasOneWithUnderscore);
|
||||
|
||||
let p2 = commands.getCommands(true).then(commands => {
|
||||
let hasOneWithUnderscore = false;
|
||||
for (let command of commands) {
|
||||
if (command[0] === '_') {
|
||||
hasOneWithUnderscore = true;
|
||||
break;
|
||||
}
|
||||
cmds = await commands.getCommands(true);
|
||||
for (let command of cmds) {
|
||||
if (command[0] === '_') {
|
||||
hasOneWithUnderscore = true;
|
||||
break;
|
||||
}
|
||||
assert.ok(!hasOneWithUnderscore);
|
||||
}, done);
|
||||
|
||||
Promise.all([p1, p2]).then(() => {
|
||||
done();
|
||||
}, done);
|
||||
}
|
||||
assert.ok(!hasOneWithUnderscore);
|
||||
});
|
||||
|
||||
test('command with args', async function () {
|
||||
|
||||
Reference in New Issue
Block a user