@@ -13,26 +13,33 @@ suite('vscode API - commands', () => {
1313
1414 teardown ( assertNoRpc ) ;
1515
16- test ( 'getCommands' , async function ( ) {
17-
18- let cmds = await commands . getCommands ( ) ;
19- let hasOneWithUnderscore = false ;
20- for ( let command of cmds ) {
21- if ( command [ 0 ] === '_' ) {
22- hasOneWithUnderscore = true ;
23- break ;
16+ test ( 'getCommands' , function ( done ) {
17+
18+ let p1 = commands . getCommands ( ) . then ( commands => {
19+ let hasOneWithUnderscore = false ;
20+ for ( let command of commands ) {
21+ if ( command [ 0 ] === '_' ) {
22+ hasOneWithUnderscore = true ;
23+ break ;
24+ }
2425 }
25- }
26- assert . ok ( hasOneWithUnderscore ) ;
27-
28- cmds = await commands . getCommands ( true ) ;
29- for ( let command of cmds ) {
30- if ( command [ 0 ] === '_' ) {
31- hasOneWithUnderscore = true ;
32- break ;
26+ assert . ok ( hasOneWithUnderscore ) ;
27+ } , done ) ;
28+
29+ let p2 = commands . getCommands ( true ) . then ( commands => {
30+ let hasOneWithUnderscore = false ;
31+ for ( let command of commands ) {
32+ if ( command [ 0 ] === '_' ) {
33+ hasOneWithUnderscore = true ;
34+ break ;
35+ }
3336 }
34- }
35- assert . ok ( ! hasOneWithUnderscore ) ;
37+ assert . ok ( ! hasOneWithUnderscore ) ;
38+ } , done ) ;
39+
40+ Promise . all ( [ p1 , p2 ] ) . then ( ( ) => {
41+ done ( ) ;
42+ } , done ) ;
3643 } ) ;
3744
3845 test ( 'command with args' , async function ( ) {
0 commit comments