MCPcopy
hub / github.com/apache/echarts / parseRunHash

Function parseRunHash

test/runTest/store.js:103–122  ·  view source on GitHub ↗

* Parse versions and rendering mode from run hash.

(str)

Source from the content-addressed store, hash-verified

101 * Parse versions and rendering mode from run hash.
102 */
103function parseRunHash(str) {
104 const parts = str.split(TEST_HASH_SPLITTER);
105 // Convert back PR-123 to #123 for PR versions
106 const expectedVersion = parts[0] === 'PR'
107 ? parts[1].replace('PR-', '#')
108 : parts[1];
109 const actualVersion = parts[2] === 'PR'
110 ? parts[3].replace('PR-', '#')
111 : parts[3];
112
113 return {
114 expectedSource: parts[0],
115 expectedVersion: expectedVersion,
116 actualSource: parts[2],
117 actualVersion: actualVersion,
118 renderer: parts[4],
119 useCoarsePointer: parts[5],
120 theme: parts[6] || 'none'
121 };
122}
123
124function getResultBaseDir() {
125 return path.join(RESULTS_ROOT_DIR, _runHash);

Callers 1

store.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…