Skip to content

Commit

Permalink
fix: mock qXEdge.getID for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Sep 23, 2022
1 parent 194b3b8 commit 1945c4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}`];
Expand Down

0 comments on commit 1945c4e

Please sign in to comment.