This commit is contained in:
Josh Johnson 2018-01-27 18:01:04 -05:00
parent 4bd8c9eddf
commit 988fbe22c0
6 changed files with 295 additions and 18 deletions

View file

@ -1,7 +1,7 @@
'use strict';
"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
import * as vscode from 'vscode';
import * as vscode from "vscode";
// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
@ -9,16 +9,16 @@ export function activate(context: vscode.ExtensionContext) {
// Use the console to output diagnostic information (console.log) and errors (console.error)
// This line of code will only be executed once when your extension is activated
console.log('Congratulations, your extension "xml" is now active!');
console.log("Congratulations, your extension \"xml\" is now active!");
// The command has been defined in the package.json file
// Now provide the implementation of the command with registerCommand
// The commandId parameter must match the command field in package.json
let disposable = vscode.commands.registerCommand('extension.sayHello', () => {
const disposable = vscode.commands.registerCommand("extension.sayHello", () => {
// The code you place here will be executed every time your command is executed
// Display a message box to the user
vscode.window.showInformationMessage('Hello World!');
vscode.window.showInformationMessage("Hello World!");
});
context.subscriptions.push(disposable);
@ -26,4 +26,4 @@ export function activate(context: vscode.ExtensionContext) {
// this method is called when your extension is deactivated
export function deactivate() {
}
}

View file

@ -4,12 +4,12 @@
//
// The module 'assert' provides assertion methods from node
import * as assert from 'assert';
import * as assert from "assert";
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
import * as myExtension from '../extension';
import * as vscode from "vscode";
import * as myExtension from "../extension";
// Defines a Mocha test suite to group tests of similar kind together
suite("Extension Tests", () => {
@ -19,4 +19,4 @@ suite("Extension Tests", () => {
assert.equal(-1, [1, 2, 3].indexOf(5));
assert.equal(-1, [1, 2, 3].indexOf(0));
});
});
});

View file

@ -10,13 +10,13 @@
// to report the results back to the caller. When the tests are finished, return
// a possible error to the callback or null if none.
import * as testRunner from 'vscode/lib/testrunner';
import * as testRunner from "vscode/lib/testrunner";
// You can directly control Mocha options by uncommenting the following lines
// See https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically#set-options for more info
testRunner.configure({
ui: 'tdd', // the TDD UI is being used in extension.test.ts (suite, test, etc.)
ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.)
useColors: true // colored output from test results
});
module.exports = testRunner;
module.exports = testRunner;