You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-10-31 01:45:39 +03:00
Optimise Jest run in CI (#9542)
This commit is contained in:
committed by
GitHub
parent
28ecdc0cb4
commit
04bc8fb71c
@@ -122,11 +122,19 @@ describe("MKeyVerificationConclusion", () => {
|
||||
mockClient.checkUserTrust.mockReturnValue(trustworthy);
|
||||
|
||||
/* Ensure we don't rerender for every trust status change of any user */
|
||||
mockClient.emit(CryptoEvent.UserTrustStatusChanged, "@anotheruser:domain");
|
||||
mockClient.emit(
|
||||
CryptoEvent.UserTrustStatusChanged,
|
||||
"@anotheruser:domain",
|
||||
new UserTrustLevel(true, true, true),
|
||||
);
|
||||
expect(renderer.toJSON()).toBeNull();
|
||||
|
||||
/* But when our user changes, we do rerender */
|
||||
mockClient.emit(CryptoEvent.UserTrustStatusChanged, event.verificationRequest.otherUserId);
|
||||
mockClient.emit(
|
||||
CryptoEvent.UserTrustStatusChanged,
|
||||
event.verificationRequest.otherUserId,
|
||||
new UserTrustLevel(true, true, true),
|
||||
);
|
||||
expect(renderer.toJSON()).not.toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user