ci: executeBatch should compare JSON after serialization, to avoid inconsistencies between main and own mode

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-06-27 10:30:58 +02:00
parent b8458a53f6
commit 988c4a6354

View file

@ -778,8 +778,9 @@ export class ExecuteBatch extends BaseCommand {
}${workflowData.id}-snapshot.json`;
if (fs.existsSync(fileName)) {
const contents = fs.readFileSync(fileName, { encoding: 'utf-8' });
const changes = diff(JSON.parse(contents), data, { keysOnly: true });
const expected = JSON.parse(contents);
const recieved = JSON.parse(serializedData);
const changes = diff(expected, recieved, { keysOnly: true });
if (changes !== undefined) {
// If we had only additions with no removals