fix(Rename Keys Node): Add a warning for regex that affect performance (#18911)

This commit is contained in:
Shireen Missi
2025-08-29 14:44:28 +01:00
committed by GitHub
parent cc2ed19ecf
commit 0d1a0b5431
4 changed files with 131 additions and 27 deletions

View File

@@ -331,6 +331,20 @@ export class NodeTestHarness {
});
const msg = `Equality failed for "${testData.description}" at node "${nodeName}"`;
// When continue on fail is on the json wrapper is removed for some reason
const runs = output.nodeData[nodeName];
if (Array.isArray(runs)) {
for (let runIndex = 0; runIndex < runs.length; runIndex++) {
const run = runs[runIndex];
if (!Array.isArray(run)) continue;
for (let itemIndex = 0; itemIndex < run.length; itemIndex++) {
const original = run[itemIndex];
if (original && !original.json) {
run[itemIndex] = { json: { ...original } };
}
}
}
}
expect(resultData, msg).toEqual(output.nodeData[nodeName]);
});