File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 63
63
" onFileSystem:objectscript" ,
64
64
" onDebugInitialConfigurations"
65
65
],
66
- "main" : " ./out /extension" ,
66
+ "main" : " ./dist /extension" ,
67
67
"contributes" : {
68
68
"menus" : {
69
69
"commandPalette" : [
720
720
"webpack" : " webpack --mode development" ,
721
721
"webpack-dev" : " webpack --mode development --watch" ,
722
722
"package" : " vsce package" ,
723
- "compile" : " tsc -p ./" ,
723
+ "compile" : " webpack --mode production && tsc -p ./" ,
724
724
"watch" : " tsc -w -p ./tsconfig.json" ,
725
725
"pretest" : " npm run compile" ,
726
726
"test" : " node ./out/test/runTest.js" ,
Original file line number Diff line number Diff line change 1
- const extensionId = "daimor.vscode-objectscript" ;
1
+ export const extensionId = "daimor.vscode-objectscript" ;
2
2
3
3
import vscode = require( "vscode" ) ;
4
4
Original file line number Diff line number Diff line change @@ -3,12 +3,18 @@ import { before } from "mocha";
3
3
4
4
// You can import and use all API from the 'vscode' module
5
5
// as well as import your extension to test it
6
- import * as vscode from "vscode" ;
7
- // import * as myExtension from ' ../extension' ;
6
+ import { window , extensions } from "vscode" ;
7
+ import { extensionId } from " ../../ extension" ;
8
8
9
9
suite ( "Extension Test Suite" , ( ) => {
10
+ suiteSetup ( async function ( ) {
11
+ // make sure git is activated
12
+ const ext = extensions . getExtension ( extensionId ) ;
13
+ await ext ?. activate ( ) ;
14
+ } ) ;
15
+
10
16
before ( ( ) => {
11
- vscode . window . showInformationMessage ( "Start all tests." ) ;
17
+ window . showInformationMessage ( "Start all tests." ) ;
12
18
} ) ;
13
19
14
20
test ( "Sample test" , ( ) => {
You can’t perform that action at this time.
0 commit comments