-
-
Notifications
You must be signed in to change notification settings - Fork 833
Conversation
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Codecov Report
@@ Coverage Diff @@
## develop #8064 +/- ##
========================================
Coverage 27.02% 27.02%
========================================
Files 866 866
Lines 52015 52015
Branches 13185 13185
========================================
Hits 14055 14055
Misses 37960 37960 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small comments, but looks good.
test/test-utils/beacon.ts
Outdated
...contentProps, | ||
}; | ||
const event = new MatrixEvent({ | ||
type: `${M_BEACON_INFO.name}.${sender}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer e.g. .1
instead of .${sender}
just because I don't want to propagate the confusing mistake made in the MSC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in practice and here we should use something like .${sender}.${counter}
to have the likelihood of colliding event types much lower. Added a counter
test/test-utils/beacon.ts
Outdated
}; | ||
|
||
type ContentProps = { | ||
uri: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd prefer a name like geouri
to make it clear it's not just any URI.
}); | ||
* ``` | ||
*/ | ||
export const getMockClientWithEventEmitter = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this name mention that we are overriding MatrixClientPeg.get
as well as returning the mock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already a pretty long function name, the comment mentions that it mocks the peg.
Signed-off-by: Kerry Archibald <kerrya@element.io>
This change is marked as an internal change (Task), so will not be included in the changelog.
Preview: https://pr8064--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.