MCPcopy Index your code
hub / github.com/apache/echarts / startTests

Function startTests

test/runTest/server.js:177–258  ·  view source on GitHub ↗
(testsNameList, socket, {
    noHeadless,
    threadsCount,
    replaySpeed,
    actualSource,
    actualVersion,
    expectedSource,
    expectedVersion,
    renderer,
    useCoarsePointer,
    theme,
    noSave
})

Source from the content-addressed store, hash-verified

175}
176
177function startTests(testsNameList, socket, {
178 noHeadless,
179 threadsCount,
180 replaySpeed,
181 actualSource,
182 actualVersion,
183 expectedSource,
184 expectedVersion,
185 renderer,
186 useCoarsePointer,
187 theme,
188 noSave
189}) {
190 console.log('Received: ', testsNameList.join(','));
191
192 return new Promise(resolve => {
193 pendingTests = getTestsList().filter(testOpt => {
194 return testsNameList.includes(testOpt.name);
195 });
196
197 if (!noSave) {
198 pendingTests.forEach(testOpt => {
199 // Reset all tests results
200 testOpt.status = 'pending';
201 testOpt.results = [];
202 });
203 // Save status immediately
204 saveTestsList();
205
206 socket.emit('update', {
207 tests: getTestsList(),
208 running: true
209 });
210 }
211
212 threadsCount = Math.min(
213 Math.ceil((threadsCount || 1) / CLI_FIXED_THREADS_COUNT),
214 pendingTests.length
215 );
216 let runningCount = threadsCount;
217 function onExit() {
218 runningCount--;
219 if (runningCount === 0) {
220 runningThreads = [];
221 resolve();
222 }
223 }
224 function onUpdate() {
225 // Merge tests.
226 if (isRunning() && !noSave) {
227 socket.emit('update', {
228 tests: getTestsList(),
229 running: true
230 });
231 }
232 }
233
234 // Assigning tests to threads

Callers 1

startFunction · 0.85

Calls 4

getResultBaseDirFunction · 0.85
forkMethod · 0.80
filterMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…