diff --git a/extensions/vscode-api-tests/src/commands.test.ts b/extensions/vscode-api-tests/src/commands.test.ts index 3880094bd01..0e1cfdd1fa7 100644 --- a/extensions/vscode-api-tests/src/commands.test.ts +++ b/extensions/vscode-api-tests/src/commands.test.ts @@ -6,12 +6,12 @@ 'use strict'; import * as assert from 'assert'; -import {join} from 'path'; -import {commands, workspace, window, Uri, ViewColumn} from 'vscode'; +import { join } from 'path'; +import { commands, workspace, window, Uri, ViewColumn } from 'vscode'; suite('commands namespace tests', () => { - test('getCommands', function(done) { + test('getCommands', function (done) { let p1 = commands.getCommands().then(commands => { let hasOneWithUnderscore = false; @@ -43,7 +43,7 @@ suite('commands namespace tests', () => { test('command with args', function () { let args: IArguments; - let registration = commands.registerCommand('t1', function() { + let registration = commands.registerCommand('t1', function () { args = arguments; }); @@ -59,7 +59,7 @@ suite('commands namespace tests', () => { test('editorCommand with extra args', function () { let args: IArguments; - let registration = commands.registerTextEditorCommand('t1', function() { + let registration = commands.registerTextEditorCommand('t1', function () { args = arguments; }); diff --git a/extensions/vscode-api-tests/src/editor.test.ts b/extensions/vscode-api-tests/src/editor.test.ts index 6cf498ee9c9..9aef53e0537 100644 --- a/extensions/vscode-api-tests/src/editor.test.ts +++ b/extensions/vscode-api-tests/src/editor.test.ts @@ -6,14 +6,14 @@ 'use strict'; import * as assert from 'assert'; -import {workspace, window, Position, Range, commands} from 'vscode'; -import {createRandomFile, deleteFile, cleanUp} from './utils'; +import { workspace, window, Position, Range, commands } from 'vscode'; +import { createRandomFile, deleteFile, cleanUp } from './utils'; suite('editor tests', () => { teardown(cleanUp); - function withRandomFileEditor(initialContents:string, run:(editor:vscode.TextEditor, doc:vscode.TextDocument)=>Thenable): Thenable { + function withRandomFileEditor(initialContents: string, run: (editor: vscode.TextEditor, doc: vscode.TextDocument) => Thenable): Thenable { return createRandomFile(initialContents).then(file => { return workspace.openTextDocument(file).then(doc => { return window.showTextDocument(doc).then((editor) => { @@ -57,7 +57,7 @@ suite('editor tests', () => { }); }); - function executeReplace(editor:vscode.TextEditor, range:Range, text:string, undoStopBefore:boolean, undoStopAfter: boolean): Thenable { + function executeReplace(editor: vscode.TextEditor, range: Range, text: string, undoStopBefore: boolean, undoStopAfter: boolean): Thenable { return editor.edit((builder) => { builder.replace(range, text); }, { undoStopBefore: undoStopBefore, undoStopAfter: undoStopAfter }); diff --git a/extensions/vscode-api-tests/src/env.test.ts b/extensions/vscode-api-tests/src/env.test.ts index 657b559b5d2..4746255297c 100644 --- a/extensions/vscode-api-tests/src/env.test.ts +++ b/extensions/vscode-api-tests/src/env.test.ts @@ -6,18 +6,18 @@ 'use strict'; import * as assert from 'assert'; -import {env} from 'vscode'; +import { env } from 'vscode'; suite('env-namespace', () => { - test('env is set', function() { + test('env is set', function () { assert.equal(typeof env.language, 'string'); assert.equal(typeof env.appName, 'string'); assert.equal(typeof env.machineId, 'string'); assert.equal(typeof env.sessionId, 'string'); }); - test('env is readonly', function() { + test('env is readonly', function () { assert.throws(() => env.language = '234'); assert.throws(() => env.appName = '234'); assert.throws(() => env.machineId = '234'); diff --git a/extensions/vscode-api-tests/src/index.ts b/extensions/vscode-api-tests/src/index.ts index 9147c171546..984d15dafc5 100644 --- a/extensions/vscode-api-tests/src/index.ts +++ b/extensions/vscode-api-tests/src/index.ts @@ -25,4 +25,4 @@ testRunner.configure({ timeout: 10000 }); -export= testRunner; \ No newline at end of file +export = testRunner; \ No newline at end of file diff --git a/extensions/vscode-api-tests/src/languages.test.ts b/extensions/vscode-api-tests/src/languages.test.ts index 4ffb3b1afc7..7864899d20a 100644 --- a/extensions/vscode-api-tests/src/languages.test.ts +++ b/extensions/vscode-api-tests/src/languages.test.ts @@ -6,9 +6,11 @@ 'use strict'; import * as assert from 'assert'; -import {join} from 'path'; -import {languages, workspace, commands, Uri, Diagnostic, Range, Command, Disposable, CancellationToken, - CompletionList, CompletionItem, CompletionItemKind, TextDocument, Position} from 'vscode'; +import { join } from 'path'; +import { + languages, workspace, commands, Uri, Diagnostic, Range, Command, Disposable, CancellationToken, + CompletionList, CompletionItem, CompletionItemKind, TextDocument, Position +} from 'vscode'; suite('languages namespace tests', () => { @@ -76,7 +78,7 @@ suite('languages namespace tests', () => { let proposal = new CompletionItem('foo'); proposal.kind = CompletionItemKind.Property; ran = true; - return [ proposal ]; + return [proposal]; } }); diff --git a/extensions/vscode-api-tests/src/utils.ts b/extensions/vscode-api-tests/src/utils.ts index ea2e3406edd..d3c755d1cb2 100644 --- a/extensions/vscode-api-tests/src/utils.ts +++ b/extensions/vscode-api-tests/src/utils.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; import * as fs from 'fs'; import * as os from 'os'; -import {join} from 'path'; +import { join } from 'path'; function rndName() { return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10); diff --git a/extensions/vscode-api-tests/src/window.test.ts b/extensions/vscode-api-tests/src/window.test.ts index 3a5fbb41ab3..dab141acd20 100644 --- a/extensions/vscode-api-tests/src/window.test.ts +++ b/extensions/vscode-api-tests/src/window.test.ts @@ -6,9 +6,9 @@ 'use strict'; import * as assert from 'assert'; -import {workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind} from 'vscode'; -import {join} from 'path'; -import {cleanUp, pathEquals} from './utils'; +import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind } from 'vscode'; +import { join } from 'path'; +import { cleanUp, pathEquals } from './utils'; suite('window namespace tests', () => { @@ -88,7 +88,7 @@ suite('window namespace tests', () => { const file30Path = join(workspace.rootPath, './30linefile.ts'); let finished = false; - let failOncePlease = (err:Error) => { + let failOncePlease = (err: Error) => { if (finished) { return; } @@ -127,13 +127,13 @@ suite('window namespace tests', () => { workspace.openTextDocument(file10Path).then((doc) => { return window.showTextDocument(doc, ViewColumn.One); }).then((editor10line) => { - editor10line.selection = new Selection(new Position(9,0), new Position(9, 0)); + editor10line.selection = new Selection(new Position(9, 0), new Position(9, 0)); }).then(() => { return workspace.openTextDocument(file30Path); }).then((doc) => { return window.showTextDocument(doc, ViewColumn.One); }).then((editor30line) => { - editor30line.selection = new Selection(new Position(29,0), new Position(29, 0)); + editor30line.selection = new Selection(new Position(29, 0), new Position(29, 0)); }).then(() => { return workspace.openTextDocument(file10Path); }).then((doc) => { diff --git a/extensions/vscode-api-tests/src/workspace.test.ts b/extensions/vscode-api-tests/src/workspace.test.ts index 3ec3b3d5046..37c0f9e3f4f 100644 --- a/extensions/vscode-api-tests/src/workspace.test.ts +++ b/extensions/vscode-api-tests/src/workspace.test.ts @@ -6,9 +6,9 @@ 'use strict'; import * as assert from 'assert'; -import {workspace, TextDocument, window, Position, Uri, EventEmitter, WorkspaceEdit} from 'vscode'; -import {createRandomFile, deleteFile, cleanUp, pathEquals} from './utils'; -import {join, basename} from 'path'; +import { workspace, TextDocument, window, Position, Uri, EventEmitter, WorkspaceEdit } from 'vscode'; +import { createRandomFile, deleteFile, cleanUp, pathEquals } from './utils'; +import { join, basename } from 'path'; import * as fs from 'fs'; suite('workspace-namespace', () => { @@ -38,7 +38,7 @@ suite('workspace-namespace', () => { assert.ok(config.has('get')); assert.equal(config.get('get'), 'get-prop'); assert.deepEqual(config['get'], config.get); - assert.throws(() => config['get'] = 'get-prop'); + assert.throws(() => config['get'] = 'get-prop'); }); // test('configuration, getConfig/value', () => { diff --git a/extensions/vscode-api-tests/typings/mocha.d.ts b/extensions/vscode-api-tests/typings/mocha.d.ts index 7b23f5d1816..f677473dcdd 100644 --- a/extensions/vscode-api-tests/typings/mocha.d.ts +++ b/extensions/vscode-api-tests/typings/mocha.d.ts @@ -5,9 +5,9 @@ declare function run(): void; -declare function suite(name: string, fn: (err?)=>void); -declare function test(name: string, fn: (done?: (err?)=>void)=>void); -declare function suiteSetup(fn: (done?: (err?)=>void)=>void); -declare function suiteTeardown(fn: (done?: (err?)=>void)=>void); -declare function setup(fn: (done?: (err?)=>void)=>void); -declare function teardown(fn: (done?: (err?)=>void)=>void); +declare function suite(name: string, fn: (err?) => void); +declare function test(name: string, fn: (done?: (err?) => void) => void); +declare function suiteSetup(fn: (done?: (err?) => void) => void); +declare function suiteTeardown(fn: (done?: (err?) => void) => void); +declare function setup(fn: (done?: (err?) => void) => void); +declare function teardown(fn: (done?: (err?) => void) => void);