File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed
Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ Update status of test suite when all tests pass (parametric tests)
Original file line number Diff line number Diff line change @@ -33,6 +33,20 @@ export class TestResultsService implements ITestResultsService {
3333 }
3434 }
3535 } ) ;
36+ tests . testSuites . forEach ( item => {
37+ if ( typeof item . testSuite . passed === 'boolean' ) {
38+ if ( status === TestStatus . Pass ? item . testSuite . passed : ! item . testSuite . passed ) {
39+ visitParentsRecursive ( tests , item . testSuite , visitor ) ;
40+ }
41+ }
42+ } ) ;
43+ tests . testFunctions . forEach ( item => {
44+ if ( typeof item . testFunction . passed === 'boolean' ) {
45+ if ( status === TestStatus . Pass ? item . testFunction . passed : ! item . testFunction . passed ) {
46+ visitParentsRecursive ( tests , item . testFunction , visitor ) ;
47+ }
48+ }
49+ } ) ;
3650 }
3751 private updateTestFolderResults ( testFolder : TestFolder ) : void {
3852 let totalTime = 0 ;
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ export class TestTreeItem extends TreeItem {
7676 return '' ;
7777 }
7878 if ( this . testType !== TestType . testFunction ) {
79+ if ( result . functionsPassed === undefined ) {
80+ return '' ;
81+ }
7982 return `${ result . functionsFailed } failed, ${ result . functionsPassed } passed in ${ + result . time . toFixed ( 3 ) } seconds` ;
8083 }
8184 switch ( this . data . status ) {
Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ export type TestDataItem = TestWorkspaceFolder | TestFolder | TestFile | TestSui
160160
161161export class TestWorkspaceFolder {
162162 public status ?: TestStatus ;
163+ public time ?: number ;
164+ public functionsPassed ?: number ;
165+ public functionsFailed ?: number ;
166+ public functionsDidNotRun ?: number ;
163167 constructor ( public readonly workspaceFolder : WorkspaceFolder ) { }
164168 public get resource ( ) : Uri {
165169 return this . workspaceFolder . uri ;
You can’t perform that action at this time.
0 commit comments