@@ -7,9 +7,9 @@ import { fsPath } from "../../../src/utils";
77import { log , logInfo } from "../../../src/utils/log" ;
88import { makeRegexForTest } from "../../../src/utils/test" ;
99import { TestOutlineVisitor } from "../../../src/utils/vscode/outline" ;
10- import { SuiteTreeItem , TestResultsProvider , TestStatus } from "../../../src/views/test_view" ;
10+ import { TestStatus } from "../../../src/views/test_view" ;
1111import { DartDebugClient } from "../../dart_debug_client" ;
12- import { activate , defer , delay , ext , extApi , getExpectedResults , getLaunchConfiguration , getPackages , helloWorldTestBrokenFile , helloWorldTestDupeNameFile , helloWorldTestMainFile , helloWorldTestSkipFile , helloWorldTestTreeFile , openFile , positionOf , withTimeout } from "../../helpers" ;
12+ import { activate , defer , delay , ext , extApi , getExpectedResults , getLaunchConfiguration , getPackages , helloWorldTestBrokenFile , helloWorldTestDupeNameFile , helloWorldTestMainFile , helloWorldTestSkipFile , helloWorldTestTreeFile , makeTextTree , openFile , positionOf , withTimeout } from "../../helpers" ;
1313
1414describe ( "dart test debugger" , ( ) => {
1515 // We have tests that require external packages.
@@ -291,21 +291,3 @@ describe("dart test debugger", () => {
291291 ] ) ;
292292 }
293293} ) ;
294- function makeTextTree ( suite : vs . Uri , provider : TestResultsProvider , parent ?: vs . TreeItem , buffer : string [ ] = [ ] , indent = 0 ) {
295- const items = provider . getChildren ( parent )
296- // Filter to only the suite we were given (though includes all children).
297- . filter ( ( item ) => ( fsPath ( item . resourceUri ! ) === fsPath ( suite ) ) || ! ! parent ) ;
298- const wsPath = fsPath ( vs . workspace . getWorkspaceFolder ( suite ) ! . uri ) ;
299- items . forEach ( ( item ) => {
300- // Suites don't have a .label (since the rendering is based on the resourceUri) so just
301- // fabricate one here that can be compared in the test. Note: For simplity we always use
302- // forward slashes in these names, since the comparison is against hard-coded comments
303- // in the file that can only be on way.
304- const expectedLabel = item instanceof SuiteTreeItem
305- ? path . relative ( wsPath , fsPath ( item . resourceUri ! ) ) . replace ( "\\" , "/" )
306- : item . label ;
307- buffer . push ( `${ " " . repeat ( indent * 4 ) } ${ expectedLabel } (${ TestStatus [ item . status ] } )` ) ;
308- makeTextTree ( suite , provider , item , buffer , indent + 1 ) ;
309- } ) ;
310- return buffer ;
311- }
0 commit comments