Skip to content

Commit

Permalink
chore: Prepare for 0.31.0 (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdneo authored Aug 6, 2021
1 parent 6008834 commit 999809e
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 51 deletions.
39 changes: 3 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"enableProposedApi": true,
"name": "vscode-java-test",
"displayName": "Java Test Runner",
"description": "%description%",
Expand All @@ -11,7 +10,7 @@
"bugs": {
"url": "https://github.com/Microsoft/vscode-java-test/issues"
},
"homepage": "https://github.com/Microsoft/vscode-java-test/blob/master/extension/README.md",
"homepage": "https://github.com/Microsoft/vscode-java-test",
"preview": true,
"icon": "resources/logo.png",
"keywords": [
Expand Down Expand Up @@ -40,7 +39,9 @@
"workspaceContains:build.gradle",
"workspaceContains:.classpath",
"onCommand:java.test.editor.run",
"onCommand:java.test.editor.debug"
"onCommand:java.test.editor.debug",
"onCommand:java.test.runFromJavaProjectExplorer",
"onCommand:java.test.debugFromJavaProjectExplorer"
],
"main": "./main.js",
"contributes": {
Expand Down Expand Up @@ -263,10 +264,7 @@
"test": "npm run compile && node ./dist/test/index.js",
"lint": "gulp lint",
"build-plugin": "gulp build-plugin",
"vscode:prepublish": "webpack --mode production",
"download-api": "vscode-dts dev -f",
"postdownload-api": "vscode-dts main -f",
"postinstall": "npm run download-api"
"vscode:prepublish": "webpack --mode production"
},
"extensionDependencies": [
"redhat.java",
Expand All @@ -278,7 +276,7 @@
"@types/lodash": "^4.14.150",
"@types/mocha": "^2.2.48",
"@types/node": "^14.14.33",
"@types/vscode": "1.56.0",
"@types/vscode": "1.59.0",
"gulp": "^4.0.2",
"gulp-tslint": "^8.1.4",
"mocha": "^7.1.2",
Expand All @@ -287,8 +285,7 @@
"typescript": "^4.2.4",
"vscode-test": "^1.3.0",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.11",
"vscode-dts": "^0.3.1"
"webpack-cli": "^3.3.11"
},
"dependencies": {
"@types/lru-cache": "^5.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/runners/junitRunner/JUnitRunnerResultAnalyzer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Licensed under the MIT license.

import * as path from 'path';
import { Location, MarkdownString, Range, TestItem, TestMessage, TestResultState } from 'vscode';
import { Location, MarkdownString, Range, TestItem, TestMessage } from 'vscode';
import { INVOCATION_PREFIX } from '../../constants';
import { dataCache, ITestItemData } from '../../controller/testItemDataCache';
import { createTestItem } from '../../controller/utils';
import { IJavaTestItem, IRunTestContext, TestKind, TestLevel } from '../../types';
import { IRunnerResultAnalyzer } from '../baseRunner/IRunnerResultAnalyzer';
import { findTestLocation, setTestState } from '../utils';
import { findTestLocation, setTestState, TestResultState } from '../utils';

export class JUnitRunnerResultAnalyzer implements IRunnerResultAnalyzer {

Expand Down
4 changes: 2 additions & 2 deletions src/runners/testngRunner/TestNGRunnerResultAnalyzer.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

import { Location, MarkdownString, TestItem, TestMessage, TestResultState } from 'vscode';
import { Location, MarkdownString, TestItem, TestMessage } from 'vscode';
import { dataCache } from '../../controller/testItemDataCache';
import { IRunTestContext, TestLevel } from '../../types';
import { IRunnerResultAnalyzer } from '../baseRunner/IRunnerResultAnalyzer';
import { setTestState } from '../utils';
import { setTestState, TestResultState } from '../utils';

const TEST_START: string = 'testStarted';
const TEST_FAIL: string = 'testFailed';
Expand Down
18 changes: 17 additions & 1 deletion src/runners/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

import { Location, TestItem, TestMessage, TestResultState, TestRun, Uri } from 'vscode';
import { Location, TestItem, TestMessage, TestRun, Uri } from 'vscode';
import { JavaTestRunnerCommands } from '../constants';
import { asRange } from '../controller/utils';
import { executeJavaLanguageServerCommand } from '../utils/commandUtils';
Expand Down Expand Up @@ -36,3 +36,19 @@ export function setTestState(testRun: TestRun, item: TestItem, result: TestResul
break;
}
}

// Copied from the proposed part of the API
export enum TestResultState {
// Test will be run, but is not currently running.
Queued = 1,
// Test is currently running
Running = 2,
// Test run has passed
Passed = 3,
// Test run has failed (on an assertion)
Failed = 4,
// Test run has been skipped
Skipped = 5,
// Test run failed for some other reason (compilation error, timeout, etc)
Errored = 6,
}

0 comments on commit 999809e

Please sign in to comment.