You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Optimise Jest run in CI (#9542)
This commit is contained in:
committed by
GitHub
parent
28ecdc0cb4
commit
04bc8fb71c
@ -158,7 +158,7 @@ describe("Notifier", () => {
|
||||
it('does not create notifications for own event', () => {
|
||||
const ownEvent = new MatrixEvent({ sender: userId });
|
||||
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing);
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing, null);
|
||||
mockClient!.emit(ClientEvent.Event, ownEvent);
|
||||
|
||||
expect(MockPlatform.displayNotification).not.toHaveBeenCalled();
|
||||
@ -173,7 +173,7 @@ describe("Notifier", () => {
|
||||
},
|
||||
});
|
||||
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing);
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing, null);
|
||||
mockClient!.emit(ClientEvent.Event, event);
|
||||
|
||||
expect(MockPlatform.displayNotification).not.toHaveBeenCalled();
|
||||
@ -181,7 +181,7 @@ describe("Notifier", () => {
|
||||
});
|
||||
|
||||
it('creates desktop notification when enabled', () => {
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing);
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing, null);
|
||||
mockClient!.emit(ClientEvent.Event, event);
|
||||
|
||||
expect(MockPlatform.displayNotification).toHaveBeenCalledWith(
|
||||
@ -194,7 +194,7 @@ describe("Notifier", () => {
|
||||
});
|
||||
|
||||
it('creates a loud notification when enabled', () => {
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing);
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing, null);
|
||||
mockClient!.emit(ClientEvent.Event, event);
|
||||
|
||||
expect(MockPlatform.loudNotification).toHaveBeenCalledWith(
|
||||
@ -210,7 +210,7 @@ describe("Notifier", () => {
|
||||
},
|
||||
});
|
||||
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing);
|
||||
mockClient!.emit(ClientEvent.Sync, SyncState.Syncing, null);
|
||||
mockClient!.emit(ClientEvent.Event, event);
|
||||
|
||||
// desktop notification created
|
||||
|
Reference in New Issue
Block a user