Update test framework: fix run_tests.py to support all test files, add auto-import-check for test files

This commit is contained in:
qiaoxinjiu
2026-05-09 15:11:30 +08:00
parent eb053a347f
commit eaba8328da
21739 changed files with 2236758 additions and 719 deletions

25
node_modules/jsondiffpatch/lib/contexts/diff.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import Context from './context.js';
import defaultClone from '../clone.js';
class DiffContext extends Context {
constructor(left, right) {
super();
this.left = left;
this.right = right;
this.pipe = 'diff';
}
setResult(result) {
if (this.options.cloneDiffValues && typeof result === 'object') {
const clone = typeof this.options.cloneDiffValues === 'function'
? this.options.cloneDiffValues
: defaultClone;
if (typeof result[0] === 'object') {
result[0] = clone(result[0]);
}
if (typeof result[1] === 'object') {
result[1] = clone(result[1]);
}
}
return super.setResult(result);
}
}
export default DiffContext;