From 1945c4e86d64a6f466a9dab6840ecad9a76102a1 Mon Sep 17 00:00:00 2001 From: tokebe <43009413+tokebe@users.noreply.github.com> Date: Fri, 23 Sep 2022 13:46:49 -0400 Subject: [PATCH] fix: mock qXEdge.getID for testing --- src/record.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/record.ts b/src/record.ts index 351fb13..278a4fa 100644 --- a/src/record.ts +++ b/src/record.ts @@ -298,6 +298,9 @@ export class Record { // for user-made records lacking qXEdge protected makeFakeQXEdge(record: FrozenRecord | VerboseFrozenRecord | MinimalFrozenRecord): QXEdge { return { + getID(): string { + return 'fakeEdge'; + }, getSubject(): QNode { return { getID(): string { @@ -443,7 +446,7 @@ export class Record { protected get _configuredEdgeAttributesForHash(): string { return this._getFlattenedEdgeAttributes(this.mappedResponse["edge-attributes"]) .filter(attribute => { - return this.config.EDGE_ATTRIBUTES_USED_IN_RECORD_HASH.includes(attribute.attribute_type_id); + return this.config?.EDGE_ATTRIBUTES_USED_IN_RECORD_HASH?.includes(attribute.attribute_type_id); }) .reduce((acc, attribute) => { return [...acc, `${attribute.attribute_type_id}:${attribute.value}`];