File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
test/unit/lib/tests-tree-builder Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ module.exports = class GuiTestsTreeBuilder extends BaseTestsTreeBuilder {
2424 getTestBranch ( id ) {
2525 const getSuites = ( suite ) => {
2626 if ( suite . root ) {
27- return { id : suite . id , status : suite . status } ;
27+ return [ { id : suite . id , status : suite . status } ] ;
2828 }
2929
3030 return _ . flatten ( [
Original file line number Diff line number Diff line change @@ -242,4 +242,17 @@ describe('GuiResultsTreeBuilder', () => {
242242 } ) ;
243243 } ) ;
244244 } ) ;
245+
246+ describe ( 'getTestBranch' , ( ) => {
247+ it ( 'should return "suites" as array for root suite' , ( ) => {
248+ builder . addTestResult (
249+ mkTestResult_ ( { status : IDLE } ) ,
250+ mkFormattedResult_ ( { testPath : [ 's' ] , browserId : 'b' , attempt : 0 } )
251+ ) ;
252+
253+ const { suites} = builder . getTestBranch ( 's b 0' ) ;
254+
255+ assert . deepEqual ( suites , [ { id : 's' , status : IDLE } ] ) ;
256+ } ) ;
257+ } ) ;
245258} ) ;
You can’t perform that action at this time.
0 commit comments