use import mocha instead of <reference> for some tests
This commit is contained in:
parent
a50a146651
commit
69832fddf6
20 changed files with 21 additions and 12 deletions
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection, workspace } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
@ -221,13 +222,13 @@ m10
|
|||
.hoo {
|
||||
background:
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
return withRandomFileEditor(scssContentsNoExpand, 'scss', (editor, doc) => {
|
||||
editor.selections = [
|
||||
new Selection(1, 3, 1, 3), // outside rule
|
||||
new Selection(5, 15, 5, 15) // in the value part of property value
|
||||
new Selection(5, 15, 5, 15) // in the value part of property value
|
||||
];
|
||||
return expandEmmetAbbreviation(null).then(() => {
|
||||
assert.equal(editor.document.getText(), scssContentsNoExpand);
|
||||
|
@ -344,7 +345,7 @@ suite('Tests for Wrap with Abbreviations', () => {
|
|||
|
||||
suite('Tests for jsx, xml and xsl', () => {
|
||||
teardown(closeAllEditors);
|
||||
|
||||
|
||||
test('Expand abbreviation with className instead of class in jsx', () => {
|
||||
return withRandomFileEditor('ul.nav', 'javascriptreact', (editor, doc) => {
|
||||
editor.selection = new Selection(0, 6, 0, 6);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
@ -18,7 +19,7 @@ suite('Tests for Next/Previous Select/Edit point and Balance actions', () => {
|
|||
margin: 20px 10px;
|
||||
background-image: url('tryme.png');
|
||||
}
|
||||
|
||||
|
||||
.boo .hoo {
|
||||
margin: 10px;
|
||||
}
|
||||
|
@ -45,7 +46,7 @@ suite('Tests for Next/Previous Select/Edit point and Balance actions', () => {
|
|||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="header">
|
||||
<ul class="nav main">
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { Selection } from 'vscode';
|
||||
import { withRandomFileEditor, closeAllEditors } from './testUtils';
|
||||
|
|
1
extensions/emmet/src/typings/refs.d.ts
vendored
1
extensions/emmet/src/typings/refs.d.ts
vendored
|
@ -5,4 +5,3 @@
|
|||
|
||||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
/// <reference types='@types/mocha'/>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import { GitStatusParser } from '../git';
|
||||
import * as assert from 'assert';
|
||||
|
||||
|
|
1
extensions/git/src/typings/refs.d.ts
vendored
1
extensions/git/src/typings/refs.d.ts
vendored
|
@ -6,4 +6,3 @@
|
|||
/// <reference path='../../../../src/vs/vscode.d.ts'/>
|
||||
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
|
||||
/// <reference types='@types/node'/>
|
||||
/// <reference types='@types/mocha'/>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import * as embeddedSupport from '../modes/embeddedSupport';
|
||||
import { TextDocument } from 'vscode-languageserver-types';
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { getJavascriptMode } from '../modes/javascriptMode';
|
||||
import { TextDocument } from 'vscode-languageserver-types';
|
||||
|
|
1
extensions/html/server/src/test/ref.d.ts
vendored
1
extensions/html/server/src/test/ref.d.ts
vendored
|
@ -1 +0,0 @@
|
|||
/// <reference types='@types/mocha'/>
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { join } from 'path';
|
||||
import { commands, workspace, window, Uri, ViewColumn, Range, Position } from 'vscode';
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
|
|
|
@ -4,5 +4,4 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference path="../../../../src/vs/vscode.d.ts" />
|
||||
/// <reference types='@types/mocha'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import 'mocha';
|
||||
import * as assert from 'assert';
|
||||
import { commands, Uri } from 'vscode';
|
||||
import { join, basename, normalize, dirname } from 'path';
|
||||
|
|
|
@ -3,5 +3,4 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
/// <reference types='@types/mocha'/>
|
||||
/// <reference types='@types/node'/>
|
||||
|
|
|
@ -19,11 +19,11 @@ import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorIn
|
|||
import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput';
|
||||
import { TestThemeService } from 'vs/platform/theme/test/common/testThemeService';
|
||||
|
||||
let activeEditor: BaseEditor = <any>{
|
||||
let activeEditor: BaseEditor = {
|
||||
getSelection: function () {
|
||||
return 'test.selection';
|
||||
}
|
||||
};
|
||||
} as any;
|
||||
|
||||
let openedEditorInput: EditorInput;
|
||||
let openedEditorOptions: EditorOptions;
|
||||
|
|
Loading…
Reference in a new issue