Skip to content

Commit

Permalink
chore(front): typos and renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
prastoin committed Jan 24, 2025
1 parent 6e3e2ed commit afb243d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ export const triggerUpdateRelationsOptimisticEffect = ({
}

if (isDefined(updatedSourceRecord)) {
targetRecordsToAttachTo.forEach((targetRecordsToAttachTo) =>
targetRecordsToAttachTo.forEach((targetRecordToAttachTo) =>
triggerAttachRelationOptimisticEffect({
cache,
sourceObjectNameSingular: sourceObjectMetadataItem.nameSingular,
sourceRecordId: updatedSourceRecord.id,
fieldNameOnTargetRecord: targetFieldMetadata.name,
targetObjectNameSingular: targetObjectMetadata.nameSingular,
targetRecordId: targetRecordsToAttachTo.id,
targetRecordId: targetRecordToAttachTo.id,
}),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ describe('isObjectRecordConnection', () => {
it.each(Object.entries(relationDefinitionMap))(
'.$relation',
(relation, expected) => {
const emtpyRecord = {};
const emptyRecord = {};
const result = isObjectRecordConnection(
{
direction: relation,
} as NonNullable<FieldMetadataItem['relationDefinition']>,
emtpyRecord,
emptyRecord,
);

expect(result).toEqual(expected);
},
);

it('should throw on unknown relation direction', () => {
const emtpyRecord = {};
const emptyRecord = {};
expect(() =>
isObjectRecordConnection(
{
direction: '20202020-bdb9-4ac4-ad5d-932960fe879b',
direction: 'UNKNOWN_TYPE',
} as any,
emtpyRecord,
emptyRecord,
),
).toThrowError();
});
Expand Down

0 comments on commit afb243d

Please sign in to comment.