Skip to content

Commit 737ff6e

Browse files
author
Kartik Raj
authored
Remove time from all nodes except the tests (#5890)
* Remove time for non-function nodes * News entry
1 parent b31f442 commit 737ff6e

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

news/1 Enhancements/5120.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Test Explorer : Remove time from all nodes except the tests

src/client/testing/common/services/testResultsService.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,10 @@ export class TestResultsService implements ITestResultsService {
3838
}
3939
let allChildrenPassed = true;
4040
let noChildrenRan = true;
41-
test.time = test.functionsPassed = test.functionsFailed = test.functionsDidNotRun = 0;
41+
test.functionsPassed = test.functionsFailed = test.functionsDidNotRun = 0;
4242

4343
const children = getChildren(test);
4444
children.forEach(child => {
45-
if (child.time) {
46-
test.time! += child.time;
47-
}
4845
if (getTestType(child) === TestType.testFunction) {
4946
if (typeof child.passed === 'boolean') {
5047
noChildrenRan = false;

src/client/testing/explorer/testTreeViewItem.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ export class TestTreeItem extends TreeItem {
8282
return '';
8383
}
8484
if (result.functionsDidNotRun) {
85-
return `${result.functionsFailed} failed, ${result.functionsDidNotRun} not run and ${result.functionsPassed} passed in ${+result.time.toFixed(3)} seconds`;
85+
return `${result.functionsFailed} failed, ${result.functionsDidNotRun} not run and ${result.functionsPassed} passed`;
8686
}
87-
return `${result.functionsFailed} failed, ${result.functionsPassed} passed in ${+result.time.toFixed(3)} seconds`;
87+
return `${result.functionsFailed} failed, ${result.functionsPassed} passed`;
8888
}
8989
switch (this.data.status) {
9090
case TestStatus.Error:

0 commit comments

Comments
 (0)