Skip to content

Commit 5d2751b

Browse files
committed
check for activation extension
1 parent 2e42b0b commit 5d2751b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
export const extensionId = "intersystems.servermanager";
23

34
import * as vscode from 'vscode';
45

src/test/suite/extension.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ import { before } from "mocha";
33

44
// You can import and use all API from the 'vscode' module
55
// 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";
88

99
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+
1016
before(() => {
11-
vscode.window.showInformationMessage("Start all tests.");
17+
window.showInformationMessage("Start all tests.");
1218
});
1319

1420
test("Sample test", () => {

0 commit comments

Comments
 (0)