MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / runTestsForNode

Method runTestsForNode

src/extension/commands/test.ts:139–158  ·  view source on GitHub ↗
(suiteData: SuiteData, nodes: TreeNode[], debug: boolean, suppressPrompts: boolean, runSkippedTests: boolean, includeCoverage: boolean, token?: vs.CancellationToken, testRun?: vs.TestRun)

Source from the content-addressed store, hash-verified

137 }
138
139 private async runTestsForNode(suiteData: SuiteData, nodes: TreeNode[], debug: boolean, suppressPrompts: boolean, runSkippedTests: boolean, includeCoverage: boolean, token?: vs.CancellationToken, testRun?: vs.TestRun) {
140 // TODO(dantup): We accept a cancellation token here, but it appears never used. Can we remove it?
141 const testSelection = getTestSelectionForNodes(nodes);
142 const programPath = fsPath(URI.file(suiteData.path));
143 const isFlutter = isInsideFlutterProject(vs.Uri.file(suiteData.path));
144
145 return this.runTests({
146 debug,
147 includeCoverage,
148 isFlutter,
149 launchTemplate: undefined,
150 programPath,
151 shouldRunSkippedTests: runSkippedTests,
152 suppressPrompts,
153 testRun,
154 testSelection,
155 token,
156 useLaunchJsonTestTemplate: true,
157 });
158 }
159
160 private async runTests({ includeCoverage, programPath, debug, testSelection, shouldRunSkippedTests, suppressPrompts, launchTemplate, testRun, token, useLaunchJsonTestTemplate, isFlutter }: TestLaunchInfo): Promise<boolean> {
161 if (useLaunchJsonTestTemplate) {

Callers 1

constructorMethod · 0.95

Calls 4

runTestsMethod · 0.95
getTestSelectionForNodesFunction · 0.90
fsPathFunction · 0.90
isInsideFlutterProjectFunction · 0.90

Tested by

no test coverage detected