Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some test utils in a new entrypoint #4127

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Mar 22, 2024

We'd like a way to generate mock encrypted events in a way that doesn't require access to private classes/methods within the JS-SDK. Accordingly, here's a new entrypoint.

I couldn't bring myself to add stuff to the README without clearing out a little of the crap, so that's included here too.

This just removes some of the most egregious lies and outdated stuff. There's a
*lot* more that can be done here.
src/testing.ts Outdated
Comment on lines 134 to 138
* Create a `MatrixEvent` representing a successfully-decrypted `m.room.encrypted` event.
*
* @param opts - Values for the event.
*/
export async function mkDecryptionFailureMatrixEvent(opts: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment does not match the name success!=failure :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

src/testing.ts Outdated Show resolved Hide resolved
@richvdh richvdh enabled auto-merge March 22, 2024 14:10
@richvdh richvdh added this pull request to the merge queue Mar 22, 2024
Merged via the queue into develop with commit dce8acb Mar 22, 2024
23 checks passed
@richvdh richvdh deleted the rav/historical_events/01_test_helpers branch March 22, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants