(job)
| 512 | } |
| 513 | function stateValuesEqual(left, right) { |
| 514 | if (Object.is(left, right)) |
| 515 | return true; |
| 516 | try { |
| 517 | return JSON.stringify(left) === JSON.stringify(right); |
| 518 | } catch { |
| 519 | return false; |
| 520 | } |
| 521 | } |
| 522 | function mergeStateJob(baseJob, intendedJob, currentJob) { |
| 523 | const merged = structuredClone(currentJob || {}); |
| 524 | const keys = new Set([ |
| 525 | ...Object.keys(baseJob || {}), |
| 526 | ...Object.keys(intendedJob || {}) |
| 527 | ]); |
| 528 | for (const key of keys) { |
| 529 | const baseHas = Object.prototype.hasOwnProperty.call(baseJob || {}, key); |
| 530 | const intendedHas = Object.prototype.hasOwnProperty.call(intendedJob || {}, key); |
| 531 | const currentHas = Object.prototype.hasOwnProperty.call(currentJob || {}, key); |
no test coverage detected