Skip to content

Commit 585ded6

Browse files
committed
fixed test merging issues
1 parent 4bb76f9 commit 585ded6

File tree

4 files changed

+7
-546
lines changed

4 files changed

+7
-546
lines changed

vscode/src/test/suite/extension.test.ts

Lines changed: 0 additions & 302 deletions
This file was deleted.

vscode/src/test/suite/general/explorer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import * as assert from 'assert';
2525
// You can import and use all API from the 'vscode' module
2626
// as well as import your extension to test it
2727
import * as vscode from 'vscode';
28-
import { awaitClient } from '../testutils';
28+
import { awaitClient } from '../../testutils';
2929
import * as myExplorer from '../../../explorer';
3030

3131
suite('Explorer Test Suite', () => {

vscode/src/test/suite/general/extension.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import * as assert from 'assert';
2626
import * as fs from 'fs';
2727
import * as path from 'path';
2828
import * as vscode from 'vscode';
29-
import * as myExtension from '../../../extension';
3029
import * as myExplorer from '../../../explorer';
3130
import { CodeAction, commands, extensions, Selection, Uri, window, workspace, TreeItem } from 'vscode';
32-
import { assertWorkspace, dumpJava, getFilePaths, openFile, prepareProject, replaceCode } from '../../testutils';
31+
import { assertWorkspace, awaitClient, dumpJava, findClusters, getFilePaths, openFile, prepareProject, replaceCode } from '../../testutils';
3332
import { FORMATTED_POM_XML, SAMPLE_CODE_FORMAT_DOCUMENT, SAMPLE_CODE_SORT_IMPORTS, SAMPLE_CODE_UNUSED_IMPORTS } from '../../constants';
33+
import { extConstants } from '../../../constants';
3434

3535
suite('Extension Test Suite', function () {
3636
window.showInformationMessage('Start all tests.');
@@ -67,7 +67,7 @@ suite('Extension Test Suite', function () {
6767
assert(nbcode);
6868

6969
const extraCluster = path.join(nbcode.extensionPath, "nbcode", "extra");
70-
let clusters = myExtension.findClusters('non-existent').
70+
let clusters = findClusters('non-existent').
7171
// ignore 'extra' cluster in the extension path, since nbjavac is there during development:
7272
filter(s => !s.startsWith(extraCluster));
7373

@@ -166,7 +166,7 @@ suite('Extension Test Suite', function () {
166166
if (refactorActions && refactorActions.length > 0) {
167167
for await (const action of refactorActions) {
168168
if (action.command && action.command.arguments) {
169-
if (action.command.command === myExtension.COMMAND_PREFIX + ".surround.with") {
169+
if (action.command.command === extConstants.COMMAND_PREFIX + ".surround.with") {
170170
//this action has a popup where the user needs to
171171
//select a template that should be used for the surround:
172172
continue;
@@ -197,7 +197,7 @@ suite('Extension Test Suite', function () {
197197
assert.strictEqual(tests[1].tests[0].name, 'testTrue', `Invalid test name returned`);
198198

199199
console.log("Test: run all workspace tests");
200-
await vscode.commands.executeCommand(myExtension.COMMAND_PREFIX + '.run.test', workspaceFolder.uri.toString());
200+
await vscode.commands.executeCommand(extConstants.COMMAND_PREFIX + '.run.test', workspaceFolder.uri.toString());
201201
console.log(`Test: run all workspace tests finished`);
202202
} catch (error) {
203203
dumpJava();
@@ -215,7 +215,7 @@ suite('Extension Test Suite', function () {
215215
const mainClass = path.join(folder, 'target', 'classes', 'pkg', 'Main.class');
216216
assert.ok(fs.statSync(mainClass).isFile(), "Class created by compilation: " + mainClass);
217217

218-
myExplorer.createViewProvider(await myExtension.awaitClient(), "foundProjects").then(async (lvp) => {
218+
myExplorer.createViewProvider(await awaitClient(), "foundProjects").then(async (lvp) => {
219219
const firstLevelChildren = await (lvp.getChildren() as Thenable<any[]>);
220220
assert.strictEqual(firstLevelChildren.length, 1, "One child under the root");
221221
const item = await (lvp.getTreeItem(firstLevelChildren[0]) as Thenable<TreeItem>);

0 commit comments

Comments
 (0)