File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
- import { deepStrictEqual } from 'assert' ;
2
- import { commands , extensions } from 'vscode' ;
1
+ import { deepStrictEqual , notEqual , strictEqual } from 'assert' ;
2
+ import { commands , extensions , window } from 'vscode' ;
3
3
4
4
// const WORKSPACE_DIR = workspace.workspaceFolders![0].uri.toString();
5
5
// const filePath = WORKSPACE_DIR + '/debugger.js';
6
6
// const fileUri = Uri.parse(filePath);
7
7
8
+ const sleep = ( time : number ) => new Promise ( ( r ) => setTimeout ( r , time ) ) ;
9
+
8
10
suite ( 'commands' , ( ) => {
9
11
setup ( async ( ) => {
10
12
const ext = extensions . getExtension ( 'oxc.oxc-vscode' ) ! ;
@@ -29,6 +31,15 @@ suite('commands', () => {
29
31
] , oxcCommands ) ;
30
32
} ) ;
31
33
34
+ test ( 'oxc.showOutputChannel' , async ( ) => {
35
+ await commands . executeCommand ( 'oxc.showOutputChannel' ) ;
36
+ await sleep ( 500 ) ;
37
+
38
+ notEqual ( window . activeTextEditor , undefined ) ;
39
+ const uri = window . activeTextEditor ! . document . uri ;
40
+ strictEqual ( uri . toString ( ) , 'output:oxc.oxc-vscode.Oxc' ) ;
41
+ } ) ;
42
+
32
43
// ToDo: check why this is not working,
33
44
// even with .gitignore deleted in th test_workspace
34
45
//
You can’t perform that action at this time.
0 commit comments