(actual: Golden, expected: Golden)
| 43 | * added circular dependencies, or fixed circular dependencies. |
| 44 | */ |
| 45 | export function compareGoldens(actual: Golden, expected: Golden) { |
| 46 | const newCircularDeps: CircularDependency[] = []; |
| 47 | const fixedCircularDeps: CircularDependency[] = []; |
| 48 | actual.forEach((a) => { |
| 49 | if (!expected.find((e) => isSameCircularDependency(a, e))) { |
| 50 | newCircularDeps.push(a); |
| 51 | } |
| 52 | }); |
| 53 | expected.forEach((e) => { |
| 54 | if (!actual.find((a) => isSameCircularDependency(e, a))) { |
| 55 | fixedCircularDeps.push(e); |
| 56 | } |
| 57 | }); |
| 58 | return {newCircularDeps, fixedCircularDeps}; |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Normalizes the a circular dependency by ensuring that the path starts with the first |
no test coverage detected