Skip to content

Commit

Permalink
cherrypick better prop changes allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBelousov authored and nick4598 committed Jan 22, 2024
1 parent 2cd6736 commit fb61375
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/transformer/src/test/IModelTransformerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,16 @@ export async function assertIdentityTransformation(
mappedRelationTargetInTargetId
);
} else if (!propChangesAllowed) {
// kept for conditional breakpoints
const _propEq = TestUtils.advancedDeepEqual(targetElem.asAny[propName], sourceElem.asAny[propName]);
expect(targetElem.asAny[propName]).to.deep.advancedEqual(
sourceElem.asAny[propName]
);
try {
expect(
(targetElem as any)[propName],
`${targetElem.id}[${propName}] didn't match ${sourceElem.id}[${propName}]`
).to.deep.advancedEqual((sourceElem as any)[propName]);
} catch (err) {
// for debugging broken tests
debugger; // eslint-disable-line no-debugger
throw err;
}
}
}
const quickClone = (obj: any) => JSON.parse(JSON.stringify(obj));
Expand Down

0 comments on commit fb61375

Please sign in to comment.