-
Notifications
You must be signed in to change notification settings - Fork 61
/
extension.js
46 lines (40 loc) · 1.82 KB
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use strict";
// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
const config = require("./lib/config");
const vscode = require("vscode");
const treeProvider = require("./lib/treeProvider");
const lensProvider = require("./lib/provider-extensions/mochaLens");
const decorationProvider = require("./lib/provider-extensions/decorationProvider");
const subscriptionRegister = require("./lib/subscriptionRegister");
const notificationsProvider = require("./lib/notificationsProvider");
const coverage = require("./lib/coverage/code-coverage");
const core = require("./lib/core");
const testStatusBar = require("./lib/provider-extensions/testStatusBar");
function bootstrap(context) {
const _treeProvider = new treeProvider();
const _testStatusBar = new testStatusBar();
const _codeLensProvider = new lensProvider(context, core);
const _decorationProvider = new decorationProvider();
const _subscriptionRegister = new subscriptionRegister();
const _notificationsProvider = new notificationsProvider();
const _coverage = new coverage();
core.run().then(() => {
_notificationsProvider.init();
_decorationProvider.init(_notificationsProvider);
_coverage.init(_notificationsProvider);
_testStatusBar.init();
_subscriptionRegister.init(context, _treeProvider, _coverage);
_codeLensProvider.init(_notificationsProvider);
vscode.window.registerTreeDataProvider("mocha", _treeProvider);
vscode.languages.registerCodeLensProvider(_codeLensProvider.selector, _codeLensProvider);
if (config.coverage().enable) {
_coverage.run();
}
});
//debugInit(_mochaProvider);
}
exports.activate = bootstrap;
// this method is called when your extension is deactivated
function deactivate() {}
exports.deactivate = deactivate;