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

Function modifyEChartsCode

test/runTest/util.js:29–35  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

27const config = require('./config');
28
29function modifyEChartsCode(code) {
30 return code.replace(/Math\.random/g, '__random__inner__')
31 // https://github.com/apache/echarts/blob/737e23c0054e6b501ecc6f562920cffae953b5c6/src/core/echarts.ts#L537
32 // This code will cause infinite loop if we reduce the precision of Date in the visual regression test.
33 // TODO: This is a very dirty HACK.
34 .replace('remainTime > 0', 'false');
35}
36
37module.exports.testNameFromFile = function(fileName) {
38 return path.basename(fileName, '.html');

Callers 1

util.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…