Skip to content

Commit

Permalink
add equals and hashCode to the mock objects
Browse files Browse the repository at this point in the history
  • Loading branch information
frett committed Apr 11, 2024
1 parent 2d0620b commit af01ed9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/_tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const standardTypeValues = () => {
__doNotUseOrImplementIt: null,
_events: null,
_getAnalyticsEvents: null,
getAnalyticsEvents: null
getAnalyticsEvents: null,
equals: () => null,
hashCode: () => null
};
};

Expand Down Expand Up @@ -86,7 +88,9 @@ const createEventId = (name: string, namespace?: string): EventId => {
const createResource = (name: string, localName: string): Resource => {
return {
localName,
name
name,
equals: () => null,
hashCode: () => null
};
};

Expand All @@ -104,10 +108,7 @@ const createButton = (text: string, url: string, event: string): Button => {
width: '',
buttonColor: '',
backgroundColor: '',
icon: {
localName: '',
name: ''
},
icon: createResource('', ''),
iconGravity: {
name: 'CENTER',
ordinal: 1
Expand Down

0 comments on commit af01ed9

Please sign in to comment.