Skip to content

Commit

Permalink
test task fix and updated version
Browse files Browse the repository at this point in the history
  • Loading branch information
hey24sheep committed Oct 12, 2023
1 parent f691111 commit 92e259d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [0.3.18] - 12 October 2023
- Extension version bump to 0.3.18
- *Test Task* version bump to "0.3.4"
- *Test Task* logic change to fix false negative test case

## [0.3.17] - 12 October 2023
- Extension version bump to 0.3.17
- Updated support links in readme
Expand Down
7 changes: 6 additions & 1 deletion tasks/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ function createTestCase(suite, output, globalFailure) {
const testRunRegex = /\s*\d\d:\d\d (\+\d+)?(\s+\-\d+)?:\s*(.*)/;
let match = testRunRegex.exec(output);
if (match) {
var title = match[3];
var tSplits = match[3].split(': ');
var title = tSplits[tSplits.length - 1];
var successes = Number(match[1]);
var failures = match[2] ? -Number(match[2]) : suite.failed;
var newCase = {
Expand Down Expand Up @@ -170,6 +171,10 @@ function createTestCase(suite, output, globalFailure) {
newCase.isSuccess = true;
hasNewCase = true;
}
else {
newCase.isSuccess = true;
hasNewCase = true;
}
if (hasNewCase) {
if (suite.cases.length > 0) {
suite.cases[suite.cases.length - 1].ended = newCase.started;
Expand Down
6 changes: 5 additions & 1 deletion tasks/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ function createTestCase(suite: any, output: string, globalFailure: number) {
const testRunRegex = /\s*\d\d:\d\d (\+\d+)?(\s+\-\d+)?:\s*(.*)/;
let match = testRunRegex.exec(output);
if (match) {
var title = match[3];
var tSplits = match[3].split(': ');
var title = tSplits[tSplits.length - 1];
var successes = Number(match[1]);
var failures = match[2] ? -Number(match[2]) : suite.failed;

Expand Down Expand Up @@ -203,6 +204,9 @@ function createTestCase(suite: any, output: string, globalFailure: number) {
// everything is 0 meaning it's a new case
newCase.isSuccess = true;
hasNewCase = true;
} else {
newCase.isSuccess = true;
hasNewCase = true;
}

if (hasNewCase) {
Expand Down
2 changes: 1 addition & 1 deletion tasks/test/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version": {
"Major": 0,
"Minor": 3,
"Patch": 3
"Patch": 4
},
"instanceNameFormat": "Flutter Test",
"inputs": [
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "flutter",
"version": "0.3.17",
"version": "0.3.18",
"name": "Flutter Tasks",
"description": "Flutter extension for Azure DevOps. Install, build, analyze, command and env tasks for easier Flutter DevOps.",
"publisher": "hey24sheep",
Expand Down

0 comments on commit 92e259d

Please sign in to comment.