Browse Source

feat(test) add tests to monitor regressions in the TypeScript conversion

tags/v0.0.2
Gary Hunt 3 years ago
parent
commit
35b3d17a45
No account linked to committer's email address
35 changed files with 1718 additions and 57 deletions
  1. 80
    0
      JitsiConferenceErrors.spec.ts
  2. 233
    0
      JitsiConferenceEvents.spec.ts
  3. 32
    0
      JitsiConnectionErrors.spec.ts
  4. 35
    0
      JitsiConnectionEvents.spec.ts
  5. 32
    0
      JitsiMediaDevicesEvents.spec.ts
  6. 56
    0
      JitsiTrackErrors.spec.ts
  7. 41
    0
      JitsiTrackEvents.spec.ts
  8. 26
    0
      JitsiTranscriptionStatus.spec.ts
  9. 6
    2
      karma.conf.js
  10. 41
    0
      modules/detection/DetectionEvents.spec.ts
  11. 29
    0
      modules/proxyconnection/constants.spec.ts
  12. 52
    0
      modules/videosipgw/VideoSIPGWConstants.spec.ts
  13. 29
    0
      modules/xmpp/JingleSessionState.spec.ts
  14. 23
    0
      modules/xmpp/MediaSessionEvents.spec.ts
  15. 13
    0
      package-lock.json
  16. 1
    0
      package.json
  17. 32
    0
      service/RTC/BridgeVideoType.spec.ts
  18. 26
    0
      service/RTC/CameraFacingMode.spec.ts
  19. 35
    0
      service/RTC/CodecMimeType.spec.ts
  20. 32
    0
      service/RTC/MediaDirection.spec.ts
  21. 29
    0
      service/RTC/MediaType.spec.ts
  22. 98
    0
      service/RTC/RTCEvents.spec.ts
  23. 43
    0
      service/RTC/Resolutions.spec.ts
  24. 26
    0
      service/RTC/SignalingEvents.spec.ts
  25. 38
    0
      service/RTC/StreamEventTypes.spec.ts
  26. 26
    0
      service/RTC/VideoType.spec.ts
  27. 23
    0
      service/authentication/AuthenticationEvents.spec.ts
  28. 26
    0
      service/connectivity/ConnectionQualityEvents.spec.ts
  29. 23
    0
      service/e2eping/E2ePingEvents.spec.ts
  30. 100
    0
      service/statistics/AnalyticsEvents.spec.ts
  31. 35
    0
      service/statistics/Events.spec.ts
  32. 23
    0
      service/statistics/constants.spec.ts
  33. 304
    0
      service/xmpp/XMPPEvents.spec.ts
  34. 1
    0
      tsconfig.json
  35. 69
    55
      types/auto/JitsiTrackErrors.d.ts

+ 80
- 0
JitsiConferenceErrors.spec.ts View File

@@ -0,0 +1,80 @@
1
+import * as exported from "./JitsiConferenceErrors";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiConferenceErrors members", () => {
6
+    const {
7
+        AUTHENTICATION_REQUIRED,
8
+        CHAT_ERROR,
9
+        SETTINGS_ERROR,
10
+        CONFERENCE_DESTROYED,
11
+        CONFERENCE_MAX_USERS,
12
+        CONNECTION_ERROR,
13
+        CONFERENCE_RESTARTED,
14
+        NOT_ALLOWED_ERROR,
15
+        MEMBERS_ONLY_ERROR,
16
+        CONFERENCE_ACCESS_DENIED,
17
+        FOCUS_DISCONNECTED,
18
+        FOCUS_LEFT,
19
+        GRACEFUL_SHUTDOWN,
20
+        ICE_FAILED,
21
+        INCOMPATIBLE_SERVER_VERSIONS,
22
+        OFFER_ANSWER_FAILED,
23
+        PASSWORD_NOT_SUPPORTED,
24
+        PASSWORD_REQUIRED,
25
+        RESERVATION_ERROR,
26
+        VIDEOBRIDGE_NOT_AVAILABLE,
27
+        JitsiConferenceErrors,
28
+        ...others
29
+    } = exported as any; // TODO: remove cast after typescript conversion
30
+
31
+    it( "known members", () => {
32
+        expect( AUTHENTICATION_REQUIRED ).toBe( 'conference.authenticationRequired' );
33
+        expect( CHAT_ERROR ).toBe( 'conference.chatError' );
34
+        expect( SETTINGS_ERROR ).toBe( 'conference.settingsError' );
35
+        expect( CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
36
+        expect( CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
37
+        expect( CONNECTION_ERROR ).toBe( 'conference.connectionError' );
38
+        expect( CONFERENCE_RESTARTED ).toBe( 'conference.restarted' );
39
+        expect( NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
40
+        expect( MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );
41
+        expect( CONFERENCE_ACCESS_DENIED ).toBe( 'conference.connectionError.accessDenied' );
42
+        expect( FOCUS_DISCONNECTED ).toBe( 'conference.focusDisconnected' );
43
+        expect( FOCUS_LEFT ).toBe( 'conference.focusLeft' );
44
+        expect( GRACEFUL_SHUTDOWN ).toBe( 'conference.gracefulShutdown' );
45
+        expect( ICE_FAILED ).toBe( 'conference.iceFailed' );
46
+        expect( INCOMPATIBLE_SERVER_VERSIONS ).toBe( 'conference.incompatible_server_versions' );
47
+        expect( OFFER_ANSWER_FAILED ).toBe( 'conference.offerAnswerFailed' );
48
+        expect( PASSWORD_NOT_SUPPORTED ).toBe( 'conference.passwordNotSupported' );
49
+        expect( PASSWORD_REQUIRED ).toBe( 'conference.passwordRequired' );
50
+        expect( RESERVATION_ERROR ).toBe( 'conference.reservationError' );
51
+        expect( VIDEOBRIDGE_NOT_AVAILABLE ).toBe( 'conference.videobridgeNotAvailable' );
52
+        if ( JitsiConferenceErrors ) {
53
+            expect( JitsiConferenceErrors.AUTHENTICATION_REQUIRED ).toBe( 'conference.authenticationRequired' );
54
+            expect( JitsiConferenceErrors.CHAT_ERROR ).toBe( 'conference.chatError' );
55
+            expect( JitsiConferenceErrors.SETTINGS_ERROR ).toBe( 'conference.settingsError' );
56
+            expect( JitsiConferenceErrors.CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
57
+            expect( JitsiConferenceErrors.CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
58
+            expect( JitsiConferenceErrors.CONNECTION_ERROR ).toBe( 'conference.connectionError' );
59
+            expect( JitsiConferenceErrors.CONFERENCE_RESTARTED ).toBe( 'conference.restarted' );
60
+            expect( JitsiConferenceErrors.NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
61
+            expect( JitsiConferenceErrors.MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );
62
+            expect( JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED ).toBe( 'conference.connectionError.accessDenied' );
63
+            expect( JitsiConferenceErrors.FOCUS_DISCONNECTED ).toBe( 'conference.focusDisconnected' );
64
+            expect( JitsiConferenceErrors.FOCUS_LEFT ).toBe( 'conference.focusLeft' );
65
+            expect( JitsiConferenceErrors.GRACEFUL_SHUTDOWN ).toBe( 'conference.gracefulShutdown' );
66
+            expect( JitsiConferenceErrors.ICE_FAILED ).toBe( 'conference.iceFailed' );
67
+            expect( JitsiConferenceErrors.INCOMPATIBLE_SERVER_VERSIONS ).toBe( 'conference.incompatible_server_versions' );
68
+            expect( JitsiConferenceErrors.OFFER_ANSWER_FAILED ).toBe( 'conference.offerAnswerFailed' );
69
+            expect( JitsiConferenceErrors.PASSWORD_NOT_SUPPORTED ).toBe( 'conference.passwordNotSupported' );
70
+            expect( JitsiConferenceErrors.PASSWORD_REQUIRED ).toBe( 'conference.passwordRequired' );
71
+            expect( JitsiConferenceErrors.RESERVATION_ERROR ).toBe( 'conference.reservationError' );
72
+            expect( JitsiConferenceErrors.VIDEOBRIDGE_NOT_AVAILABLE ).toBe( 'conference.videobridgeNotAvailable' );
73
+        }
74
+    } );
75
+
76
+    it( "unknown members", () => {
77
+        const keys = Object.keys( others );
78
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
79
+    } );
80
+} );

+ 233
- 0
JitsiConferenceEvents.spec.ts View File

@@ -0,0 +1,233 @@
1
+import * as exported from "./JitsiConferenceEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiConferenceEvents members", () => {
6
+    const {
7
+        AUDIO_INPUT_STATE_CHANGE,
8
+        AUDIO_UNMUTE_PERMISSIONS_CHANGED,
9
+        AUTH_STATUS_CHANGED,
10
+        BEFORE_STATISTICS_DISPOSED,
11
+        CONFERENCE_ERROR,
12
+        CONFERENCE_FAILED,
13
+        CONFERENCE_JOIN_IN_PROGRESS,
14
+        CONFERENCE_JOINED,
15
+        CONFERENCE_LEFT,
16
+        CONFERENCE_UNIQUE_ID_SET,
17
+        CONNECTION_ESTABLISHED,
18
+        CONNECTION_INTERRUPTED,
19
+        CONNECTION_RESTORED,
20
+        DATA_CHANNEL_OPENED,
21
+        DISPLAY_NAME_CHANGED,
22
+        DOMINANT_SPEAKER_CHANGED,
23
+        CONFERENCE_CREATED_TIMESTAMP,
24
+        DTMF_SUPPORT_CHANGED,
25
+        ENDPOINT_MESSAGE_RECEIVED,
26
+        ENDPOINT_STATS_RECEIVED,
27
+        JVB121_STATUS,
28
+        KICKED,
29
+        PARTICIPANT_KICKED,
30
+        LAST_N_ENDPOINTS_CHANGED,
31
+        LOCK_STATE_CHANGED,
32
+        SERVER_REGION_CHANGED,
33
+        _MEDIA_SESSION_STARTED,
34
+        _MEDIA_SESSION_ACTIVE_CHANGED,
35
+        MEMBERS_ONLY_CHANGED,
36
+        MESSAGE_RECEIVED,
37
+        NO_AUDIO_INPUT,
38
+        NOISY_MIC,
39
+        NON_PARTICIPANT_MESSAGE_RECEIVED,
40
+        PRIVATE_MESSAGE_RECEIVED,
41
+        PARTICIPANT_CONN_STATUS_CHANGED,
42
+        PARTCIPANT_FEATURES_CHANGED,
43
+        PARTICIPANT_PROPERTY_CHANGED,
44
+        P2P_STATUS,
45
+        PHONE_NUMBER_CHANGED,
46
+        PROPERTIES_CHANGED,
47
+        RECORDER_STATE_CHANGED,
48
+        VIDEO_SIP_GW_AVAILABILITY_CHANGED,
49
+        VIDEO_SIP_GW_SESSION_STATE_CHANGED,
50
+        START_MUTED_POLICY_CHANGED,
51
+        STARTED_MUTED,
52
+        SUBJECT_CHANGED,
53
+        SUSPEND_DETECTED,
54
+        TALK_WHILE_MUTED,
55
+        TRACK_ADDED,
56
+        TRACK_AUDIO_LEVEL_CHANGED,
57
+        TRACK_MUTE_CHANGED,
58
+        TRACK_REMOVED,
59
+        TRACK_UNMUTE_REJECTED,
60
+        TRANSCRIPTION_STATUS_CHANGED,
61
+        USER_JOINED,
62
+        USER_LEFT,
63
+        USER_ROLE_CHANGED,
64
+        USER_STATUS_CHANGED,
65
+        VIDEO_UNMUTE_PERMISSIONS_CHANGED,
66
+        BOT_TYPE_CHANGED,
67
+        LOBBY_USER_JOINED,
68
+        LOBBY_USER_UPDATED,
69
+        LOBBY_USER_LEFT,
70
+        AV_MODERATION_APPROVED,
71
+        AV_MODERATION_REJECTED,
72
+        AV_MODERATION_CHANGED,
73
+        AV_MODERATION_PARTICIPANT_APPROVED,
74
+        AV_MODERATION_PARTICIPANT_REJECTED,
75
+        FACIAL_EXPRESSION_ADDED,
76
+        BREAKOUT_ROOMS_MOVE_TO_ROOM,
77
+        BREAKOUT_ROOMS_UPDATED,
78
+        JitsiConferenceEvents,
79
+        ...others
80
+    } = exported as any; // TODO: remove cast after typescript conversion
81
+
82
+    it( "known members", () => {
83
+        expect( AUDIO_INPUT_STATE_CHANGE ).toBe( 'conference.audio_input_state_changed' );
84
+        expect( AUDIO_UNMUTE_PERMISSIONS_CHANGED ).toBe( 'conference.audio_unmute_permissions_changed' );
85
+        expect( AUTH_STATUS_CHANGED ).toBe( 'conference.auth_status_changed' );
86
+        expect( BEFORE_STATISTICS_DISPOSED ).toBe( 'conference.beforeStatisticsDisposed' );
87
+        expect( CONFERENCE_ERROR ).toBe( 'conference.error' );
88
+        expect( CONFERENCE_FAILED ).toBe( 'conference.failed' );
89
+        expect( CONFERENCE_JOIN_IN_PROGRESS ).toBe( 'conference.join_in_progress' );
90
+        expect( CONFERENCE_JOINED ).toBe( 'conference.joined' );
91
+        expect( CONFERENCE_LEFT ).toBe( 'conference.left' );
92
+        expect( CONFERENCE_UNIQUE_ID_SET ).toBe( 'conference.unique_id_set' );
93
+        expect( CONNECTION_ESTABLISHED ).toBe( 'conference.connectionEstablished' );
94
+        expect( CONNECTION_INTERRUPTED ).toBe( 'conference.connectionInterrupted' );
95
+        expect( CONNECTION_RESTORED ).toBe( 'conference.connectionRestored' );
96
+        expect( DATA_CHANNEL_OPENED ).toBe( 'conference.dataChannelOpened' );
97
+        expect( DISPLAY_NAME_CHANGED ).toBe( 'conference.displayNameChanged' );
98
+        expect( DOMINANT_SPEAKER_CHANGED ).toBe( 'conference.dominantSpeaker' );
99
+        expect( CONFERENCE_CREATED_TIMESTAMP ).toBe( 'conference.createdTimestamp' );
100
+        expect( DTMF_SUPPORT_CHANGED ).toBe( 'conference.dtmfSupportChanged' );
101
+        expect( ENDPOINT_MESSAGE_RECEIVED ).toBe( 'conference.endpoint_message_received' );
102
+        expect( ENDPOINT_STATS_RECEIVED ).toBe( 'conference.endpoint_stats_received' );
103
+        expect( JVB121_STATUS ).toBe( 'conference.jvb121Status' );
104
+        expect( KICKED ).toBe( 'conference.kicked' );
105
+        expect( PARTICIPANT_KICKED ).toBe( 'conference.participant_kicked' );
106
+        expect( LAST_N_ENDPOINTS_CHANGED ).toBe( 'conference.lastNEndpointsChanged' );
107
+        expect( LOCK_STATE_CHANGED ).toBe( 'conference.lock_state_changed' );
108
+        expect( SERVER_REGION_CHANGED ).toBe( 'conference.server_region_changed' );
109
+        expect( _MEDIA_SESSION_STARTED ).toBe( 'conference.media_session.started' );
110
+        expect( _MEDIA_SESSION_ACTIVE_CHANGED ).toBe( 'conference.media_session.active_changed' );
111
+        expect( MEMBERS_ONLY_CHANGED ).toBe( 'conference.membersOnlyChanged' );
112
+        expect( MESSAGE_RECEIVED ).toBe( 'conference.messageReceived' );
113
+        expect( NO_AUDIO_INPUT ).toBe( 'conference.no_audio_input' );
114
+        expect( NOISY_MIC ).toBe( 'conference.noisy_mic' );
115
+        expect( NON_PARTICIPANT_MESSAGE_RECEIVED ).toBe( 'conference.non_participant_message_received' );
116
+        expect( PRIVATE_MESSAGE_RECEIVED ).toBe( 'conference.privateMessageReceived' );
117
+        expect( PARTICIPANT_CONN_STATUS_CHANGED ).toBe( 'conference.participant_conn_status_changed' );
118
+        expect( PARTCIPANT_FEATURES_CHANGED ).toBe( 'conference.partcipant_features_changed' );
119
+        expect( PARTICIPANT_PROPERTY_CHANGED ).toBe( 'conference.participant_property_changed' );
120
+        expect( P2P_STATUS ).toBe( 'conference.p2pStatus' );
121
+        expect( PHONE_NUMBER_CHANGED ).toBe( 'conference.phoneNumberChanged' );
122
+        expect( PROPERTIES_CHANGED ).toBe( 'conference.propertiesChanged' );
123
+        expect( RECORDER_STATE_CHANGED ).toBe( 'conference.recorderStateChanged' );
124
+        expect( VIDEO_SIP_GW_AVAILABILITY_CHANGED ).toBe( 'conference.videoSIPGWAvailabilityChanged' );
125
+        expect( VIDEO_SIP_GW_SESSION_STATE_CHANGED ).toBe( 'conference.videoSIPGWSessionStateChanged' );
126
+        expect( START_MUTED_POLICY_CHANGED ).toBe( 'conference.start_muted_policy_changed' );
127
+        expect( STARTED_MUTED ).toBe( 'conference.started_muted' );
128
+        expect( SUBJECT_CHANGED ).toBe( 'conference.subjectChanged' );
129
+        expect( SUSPEND_DETECTED ).toBe( 'conference.suspendDetected' );
130
+        expect( TALK_WHILE_MUTED ).toBe( 'conference.talk_while_muted' );
131
+        expect( TRACK_ADDED ).toBe( 'conference.trackAdded' );
132
+        expect( TRACK_AUDIO_LEVEL_CHANGED ).toBe( 'conference.audioLevelsChanged' );
133
+        expect( TRACK_MUTE_CHANGED ).toBe( 'conference.trackMuteChanged' );
134
+        expect( TRACK_REMOVED ).toBe( 'conference.trackRemoved' );
135
+        expect( TRACK_UNMUTE_REJECTED ).toBe( 'conference.trackUnmuteRejected' );
136
+        expect( TRANSCRIPTION_STATUS_CHANGED ).toBe( 'conference.transcriptionStatusChanged' );
137
+        expect( USER_JOINED ).toBe( 'conference.userJoined' );
138
+        expect( USER_LEFT ).toBe( 'conference.userLeft' );
139
+        expect( USER_ROLE_CHANGED ).toBe( 'conference.roleChanged' );
140
+        expect( USER_STATUS_CHANGED ).toBe( 'conference.statusChanged' );
141
+        expect( VIDEO_UNMUTE_PERMISSIONS_CHANGED ).toBe( 'conference.video_unmute_permissions_changed' );
142
+        expect( BOT_TYPE_CHANGED ).toBe( 'conference.bot_type_changed' );
143
+        expect( LOBBY_USER_JOINED ).toBe( 'conference.lobby.userJoined' );
144
+        expect( LOBBY_USER_UPDATED ).toBe( 'conference.lobby.userUpdated' );
145
+        expect( LOBBY_USER_LEFT ).toBe( 'conference.lobby.userLeft' );
146
+        expect( AV_MODERATION_APPROVED ).toBe( 'conference.av_moderation.approved' );
147
+        expect( AV_MODERATION_REJECTED ).toBe( 'conference.av_moderation.rejected' );
148
+        expect( AV_MODERATION_CHANGED ).toBe( 'conference.av_moderation.changed' );
149
+        expect( AV_MODERATION_PARTICIPANT_APPROVED ).toBe( 'conference.av_moderation.participant.approved' );
150
+        expect( AV_MODERATION_PARTICIPANT_REJECTED ).toBe( 'conference.av_moderation.participant.rejected' );
151
+        expect( FACIAL_EXPRESSION_ADDED ).toBe( 'conference.facial_expression.added' );
152
+        expect( BREAKOUT_ROOMS_MOVE_TO_ROOM ).toBe( 'conference.breakout-rooms.move-to-room' );
153
+        expect( BREAKOUT_ROOMS_UPDATED ).toBe( 'conference.breakout-rooms.updated' );
154
+        if ( JitsiConferenceEvents ) {
155
+            expect( JitsiConferenceEvents.AUDIO_INPUT_STATE_CHANGE ).toBe( 'conference.audio_input_state_changed' );
156
+            expect( JitsiConferenceEvents.AUDIO_UNMUTE_PERMISSIONS_CHANGED ).toBe( 'conference.audio_unmute_permissions_changed' );
157
+            expect( JitsiConferenceEvents.AUTH_STATUS_CHANGED ).toBe( 'conference.auth_status_changed' );
158
+            expect( JitsiConferenceEvents.BEFORE_STATISTICS_DISPOSED ).toBe( 'conference.beforeStatisticsDisposed' );
159
+            expect( JitsiConferenceEvents.CONFERENCE_ERROR ).toBe( 'conference.error' );
160
+            expect( JitsiConferenceEvents.CONFERENCE_FAILED ).toBe( 'conference.failed' );
161
+            expect( JitsiConferenceEvents.CONFERENCE_JOIN_IN_PROGRESS ).toBe( 'conference.join_in_progress' );
162
+            expect( JitsiConferenceEvents.CONFERENCE_JOINED ).toBe( 'conference.joined' );
163
+            expect( JitsiConferenceEvents.CONFERENCE_LEFT ).toBe( 'conference.left' );
164
+            expect( JitsiConferenceEvents.CONFERENCE_UNIQUE_ID_SET ).toBe( 'conference.unique_id_set' );
165
+            expect( JitsiConferenceEvents.CONNECTION_ESTABLISHED ).toBe( 'conference.connectionEstablished' );
166
+            expect( JitsiConferenceEvents.CONNECTION_INTERRUPTED ).toBe( 'conference.connectionInterrupted' );
167
+            expect( JitsiConferenceEvents.CONNECTION_RESTORED ).toBe( 'conference.connectionRestored' );
168
+            expect( JitsiConferenceEvents.DATA_CHANNEL_OPENED ).toBe( 'conference.dataChannelOpened' );
169
+            expect( JitsiConferenceEvents.DISPLAY_NAME_CHANGED ).toBe( 'conference.displayNameChanged' );
170
+            expect( JitsiConferenceEvents.DOMINANT_SPEAKER_CHANGED ).toBe( 'conference.dominantSpeaker' );
171
+            expect( JitsiConferenceEvents.CONFERENCE_CREATED_TIMESTAMP ).toBe( 'conference.createdTimestamp' );
172
+            expect( JitsiConferenceEvents.DTMF_SUPPORT_CHANGED ).toBe( 'conference.dtmfSupportChanged' );
173
+            expect( JitsiConferenceEvents.ENDPOINT_MESSAGE_RECEIVED ).toBe( 'conference.endpoint_message_received' );
174
+            expect( JitsiConferenceEvents.ENDPOINT_STATS_RECEIVED ).toBe( 'conference.endpoint_stats_received' );
175
+            expect( JitsiConferenceEvents.JVB121_STATUS ).toBe( 'conference.jvb121Status' );
176
+            expect( JitsiConferenceEvents.KICKED ).toBe( 'conference.kicked' );
177
+            expect( JitsiConferenceEvents.PARTICIPANT_KICKED ).toBe( 'conference.participant_kicked' );
178
+            expect( JitsiConferenceEvents.LAST_N_ENDPOINTS_CHANGED ).toBe( 'conference.lastNEndpointsChanged' );
179
+            expect( JitsiConferenceEvents.LOCK_STATE_CHANGED ).toBe( 'conference.lock_state_changed' );
180
+            expect( JitsiConferenceEvents.SERVER_REGION_CHANGED ).toBe( 'conference.server_region_changed' );
181
+            expect( JitsiConferenceEvents._MEDIA_SESSION_STARTED ).toBe( 'conference.media_session.started' );
182
+            expect( JitsiConferenceEvents._MEDIA_SESSION_ACTIVE_CHANGED ).toBe( 'conference.media_session.active_changed' );
183
+            expect( JitsiConferenceEvents.MEMBERS_ONLY_CHANGED ).toBe( 'conference.membersOnlyChanged' );
184
+            expect( JitsiConferenceEvents.MESSAGE_RECEIVED ).toBe( 'conference.messageReceived' );
185
+            expect( JitsiConferenceEvents.NO_AUDIO_INPUT ).toBe( 'conference.no_audio_input' );
186
+            expect( JitsiConferenceEvents.NOISY_MIC ).toBe( 'conference.noisy_mic' );
187
+            expect( JitsiConferenceEvents.NON_PARTICIPANT_MESSAGE_RECEIVED ).toBe( 'conference.non_participant_message_received' );
188
+            expect( JitsiConferenceEvents.PRIVATE_MESSAGE_RECEIVED ).toBe( 'conference.privateMessageReceived' );
189
+            expect( JitsiConferenceEvents.PARTICIPANT_CONN_STATUS_CHANGED ).toBe( 'conference.participant_conn_status_changed' );
190
+            expect( JitsiConferenceEvents.PARTCIPANT_FEATURES_CHANGED ).toBe( 'conference.partcipant_features_changed' );
191
+            expect( JitsiConferenceEvents.PARTICIPANT_PROPERTY_CHANGED ).toBe( 'conference.participant_property_changed' );
192
+            expect( JitsiConferenceEvents.P2P_STATUS ).toBe( 'conference.p2pStatus' );
193
+            expect( JitsiConferenceEvents.PHONE_NUMBER_CHANGED ).toBe( 'conference.phoneNumberChanged' );
194
+            expect( JitsiConferenceEvents.PROPERTIES_CHANGED ).toBe( 'conference.propertiesChanged' );
195
+            expect( JitsiConferenceEvents.RECORDER_STATE_CHANGED ).toBe( 'conference.recorderStateChanged' );
196
+            expect( JitsiConferenceEvents.VIDEO_SIP_GW_AVAILABILITY_CHANGED ).toBe( 'conference.videoSIPGWAvailabilityChanged' );
197
+            expect( JitsiConferenceEvents.VIDEO_SIP_GW_SESSION_STATE_CHANGED ).toBe( 'conference.videoSIPGWSessionStateChanged' );
198
+            expect( JitsiConferenceEvents.START_MUTED_POLICY_CHANGED ).toBe( 'conference.start_muted_policy_changed' );
199
+            expect( JitsiConferenceEvents.STARTED_MUTED ).toBe( 'conference.started_muted' );
200
+            expect( JitsiConferenceEvents.SUBJECT_CHANGED ).toBe( 'conference.subjectChanged' );
201
+            expect( JitsiConferenceEvents.SUSPEND_DETECTED ).toBe( 'conference.suspendDetected' );
202
+            expect( JitsiConferenceEvents.TALK_WHILE_MUTED ).toBe( 'conference.talk_while_muted' );
203
+            expect( JitsiConferenceEvents.TRACK_ADDED ).toBe( 'conference.trackAdded' );
204
+            expect( JitsiConferenceEvents.TRACK_AUDIO_LEVEL_CHANGED ).toBe( 'conference.audioLevelsChanged' );
205
+            expect( JitsiConferenceEvents.TRACK_MUTE_CHANGED ).toBe( 'conference.trackMuteChanged' );
206
+            expect( JitsiConferenceEvents.TRACK_REMOVED ).toBe( 'conference.trackRemoved' );
207
+            expect( JitsiConferenceEvents.TRACK_UNMUTE_REJECTED ).toBe( 'conference.trackUnmuteRejected' );
208
+            expect( JitsiConferenceEvents.TRANSCRIPTION_STATUS_CHANGED ).toBe( 'conference.transcriptionStatusChanged' );
209
+            expect( JitsiConferenceEvents.USER_JOINED ).toBe( 'conference.userJoined' );
210
+            expect( JitsiConferenceEvents.USER_LEFT ).toBe( 'conference.userLeft' );
211
+            expect( JitsiConferenceEvents.USER_ROLE_CHANGED ).toBe( 'conference.roleChanged' );
212
+            expect( JitsiConferenceEvents.USER_STATUS_CHANGED ).toBe( 'conference.statusChanged' );
213
+            expect( JitsiConferenceEvents.VIDEO_UNMUTE_PERMISSIONS_CHANGED ).toBe( 'conference.video_unmute_permissions_changed' );
214
+            expect( JitsiConferenceEvents.BOT_TYPE_CHANGED ).toBe( 'conference.bot_type_changed' );
215
+            expect( JitsiConferenceEvents.LOBBY_USER_JOINED ).toBe( 'conference.lobby.userJoined' );
216
+            expect( JitsiConferenceEvents.LOBBY_USER_UPDATED ).toBe( 'conference.lobby.userUpdated' );
217
+            expect( JitsiConferenceEvents.LOBBY_USER_LEFT ).toBe( 'conference.lobby.userLeft' );
218
+            expect( JitsiConferenceEvents.AV_MODERATION_APPROVED ).toBe( 'conference.av_moderation.approved' );
219
+            expect( JitsiConferenceEvents.AV_MODERATION_REJECTED ).toBe( 'conference.av_moderation.rejected' );
220
+            expect( JitsiConferenceEvents.AV_MODERATION_CHANGED ).toBe( 'conference.av_moderation.changed' );
221
+            expect( JitsiConferenceEvents.AV_MODERATION_PARTICIPANT_APPROVED ).toBe( 'conference.av_moderation.participant.approved' );
222
+            expect( JitsiConferenceEvents.AV_MODERATION_PARTICIPANT_REJECTED ).toBe( 'conference.av_moderation.participant.rejected' );
223
+            expect( JitsiConferenceEvents.FACIAL_EXPRESSION_ADDED ).toBe( 'conference.facial_expression.added' );
224
+            expect( JitsiConferenceEvents.BREAKOUT_ROOMS_MOVE_TO_ROOM ).toBe( 'conference.breakout-rooms.move-to-room' );
225
+            expect( JitsiConferenceEvents.BREAKOUT_ROOMS_UPDATED ).toBe( 'conference.breakout-rooms.updated' );
226
+        }
227
+    } );
228
+
229
+    it( "unknown members", () => {
230
+        const keys = Object.keys( others );
231
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
232
+    } );
233
+} );

+ 32
- 0
JitsiConnectionErrors.spec.ts View File

@@ -0,0 +1,32 @@
1
+import * as exported from "./JitsiConnectionErrors";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiConnectionErrors members", () => {
6
+    const {
7
+        CONNECTION_DROPPED_ERROR,
8
+        OTHER_ERROR,
9
+        PASSWORD_REQUIRED,
10
+        SERVER_ERROR,
11
+        JitsiConnectionErrors,
12
+        ...others
13
+    } = exported as any; // TODO: remove cast after typescript conversion
14
+
15
+    it( "known members", () => {
16
+        expect( CONNECTION_DROPPED_ERROR ).toBe( 'connection.droppedError' );
17
+        expect( OTHER_ERROR ).toBe( 'connection.otherError' );
18
+        expect( PASSWORD_REQUIRED ).toBe( 'connection.passwordRequired' );
19
+        expect( SERVER_ERROR ).toBe( 'connection.serverError' );
20
+        if ( JitsiConnectionErrors ) {
21
+            expect( JitsiConnectionErrors.CONNECTION_DROPPED_ERROR ).toBe( 'connection.droppedError' );
22
+            expect( JitsiConnectionErrors.OTHER_ERROR ).toBe( 'connection.otherError' );
23
+            expect( JitsiConnectionErrors.PASSWORD_REQUIRED ).toBe( 'connection.passwordRequired' );
24
+            expect( JitsiConnectionErrors.SERVER_ERROR ).toBe( 'connection.serverError' );
25
+        }
26
+    } );
27
+
28
+    it( "unknown members", () => {
29
+        const keys = Object.keys( others );
30
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
31
+    } );
32
+} );

+ 35
- 0
JitsiConnectionEvents.spec.ts View File

@@ -0,0 +1,35 @@
1
+import * as exported from "./JitsiConnectionEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiConnectionEvents members", () => {
6
+    const {
7
+        CONNECTION_DISCONNECTED,
8
+        CONNECTION_ESTABLISHED,
9
+        CONNECTION_FAILED,
10
+        WRONG_STATE,
11
+        DISPLAY_NAME_REQUIRED,
12
+        JitsiConnectionEvents,
13
+        ...others
14
+    } = exported as any; // TODO: remove cast after typescript conversion
15
+
16
+    it( "known members", () => {
17
+        expect( CONNECTION_DISCONNECTED ).toBe( 'connection.connectionDisconnected' );
18
+        expect( CONNECTION_ESTABLISHED ).toBe( 'connection.connectionEstablished' );
19
+        expect( CONNECTION_FAILED ).toBe( 'connection.connectionFailed' );
20
+        expect( WRONG_STATE ).toBe( 'connection.wrongState' );
21
+        expect( DISPLAY_NAME_REQUIRED ).toBe( 'connection.display_name_required' );
22
+        if ( JitsiConnectionEvents ) {
23
+            expect( JitsiConnectionEvents.CONNECTION_DISCONNECTED ).toBe( 'connection.connectionDisconnected' );
24
+            expect( JitsiConnectionEvents.CONNECTION_ESTABLISHED ).toBe( 'connection.connectionEstablished' );
25
+            expect( JitsiConnectionEvents.CONNECTION_FAILED ).toBe( 'connection.connectionFailed' );
26
+            expect( JitsiConnectionEvents.WRONG_STATE ).toBe( 'connection.wrongState' );
27
+            expect( JitsiConnectionEvents.DISPLAY_NAME_REQUIRED ).toBe( 'connection.display_name_required' );
28
+        }
29
+    } );
30
+
31
+    it( "unknown members", () => {
32
+        const keys = Object.keys( others );
33
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
34
+    } );
35
+} );

+ 32
- 0
JitsiMediaDevicesEvents.spec.ts View File

@@ -0,0 +1,32 @@
1
+import * as exported from "./JitsiMediaDevicesEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiMediaDevicesEvents members", () => {
6
+    const {
7
+        DEVICE_LIST_CHANGED,
8
+        PERMISSIONS_CHANGED,
9
+        PERMISSION_PROMPT_IS_SHOWN,
10
+        SLOW_GET_USER_MEDIA,
11
+        JitsiMediaDevicesEvents,
12
+        ...others
13
+    } = exported as any; // TODO: remove cast after typescript conversion
14
+
15
+    it( "known members", () => {
16
+        expect( DEVICE_LIST_CHANGED ).toBe( 'mediaDevices.devicechange' );
17
+        expect( PERMISSIONS_CHANGED ).toBe( 'rtc.permissions_changed' );
18
+        expect( PERMISSION_PROMPT_IS_SHOWN ).toBe( 'mediaDevices.permissionPromptIsShown' );
19
+        expect( SLOW_GET_USER_MEDIA ).toBe( 'mediaDevices.slowGetUserMedia' );
20
+        if ( JitsiMediaDevicesEvents ) {
21
+            expect( JitsiMediaDevicesEvents.DEVICE_LIST_CHANGED ).toBe( 'mediaDevices.devicechange' );
22
+            expect( JitsiMediaDevicesEvents.PERMISSIONS_CHANGED ).toBe( 'rtc.permissions_changed' );
23
+            expect( JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN ).toBe( 'mediaDevices.permissionPromptIsShown' );
24
+            expect( JitsiMediaDevicesEvents.SLOW_GET_USER_MEDIA ).toBe( 'mediaDevices.slowGetUserMedia' );
25
+        }
26
+    } );
27
+
28
+    it( "unknown members", () => {
29
+        const keys = Object.keys( others );
30
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
31
+    } );
32
+} );

+ 56
- 0
JitsiTrackErrors.spec.ts View File

@@ -0,0 +1,56 @@
1
+import * as exported from "./JitsiTrackErrors";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiTrackErrors members", () => {
6
+    const {
7
+        CONSTRAINT_FAILED,
8
+        ELECTRON_DESKTOP_PICKER_ERROR,
9
+        ELECTRON_DESKTOP_PICKER_NOT_FOUND,
10
+        GENERAL,
11
+        NOT_FOUND,
12
+        PERMISSION_DENIED,
13
+        SCREENSHARING_GENERIC_ERROR,
14
+        SCREENSHARING_USER_CANCELED,
15
+        TIMEOUT,
16
+        TRACK_IS_DISPOSED,
17
+        TRACK_NO_STREAM_FOUND,
18
+        UNSUPPORTED_RESOLUTION,
19
+        JitsiTrackErrors,
20
+        ...others
21
+    } = exported as any; // TODO: remove cast after typescript conversion
22
+
23
+    it( "known members", () => {
24
+        expect( CONSTRAINT_FAILED ).toBe( 'gum.constraint_failed' );
25
+        expect( ELECTRON_DESKTOP_PICKER_ERROR ).toBe( 'gum.electron_desktop_picker_error' );
26
+        expect( ELECTRON_DESKTOP_PICKER_NOT_FOUND ).toBe( 'gum.electron_desktop_picker_not_found' );
27
+        expect( GENERAL ).toBe( 'gum.general' );
28
+        expect( NOT_FOUND ).toBe( 'gum.not_found' );
29
+        expect( PERMISSION_DENIED ).toBe( 'gum.permission_denied' );
30
+        expect( SCREENSHARING_GENERIC_ERROR ).toBe( 'gum.screensharing_generic_error' );
31
+        expect( SCREENSHARING_USER_CANCELED ).toBe( 'gum.screensharing_user_canceled' );
32
+        expect( TIMEOUT ).toBe( 'gum.timeout' );
33
+        expect( TRACK_IS_DISPOSED ).toBe( 'track.track_is_disposed' );
34
+        expect( TRACK_NO_STREAM_FOUND ).toBe( 'track.no_stream_found' );
35
+        expect( UNSUPPORTED_RESOLUTION ).toBe( 'gum.unsupported_resolution' );
36
+        if ( JitsiTrackErrors ) {
37
+            expect( JitsiTrackErrors.CONSTRAINT_FAILED ).toBe( 'gum.constraint_failed' );
38
+            expect( JitsiTrackErrors.ELECTRON_DESKTOP_PICKER_ERROR ).toBe( 'gum.electron_desktop_picker_error' );
39
+            expect( JitsiTrackErrors.ELECTRON_DESKTOP_PICKER_NOT_FOUND ).toBe( 'gum.electron_desktop_picker_not_found' );
40
+            expect( JitsiTrackErrors.GENERAL ).toBe( 'gum.general' );
41
+            expect( JitsiTrackErrors.NOT_FOUND ).toBe( 'gum.not_found' );
42
+            expect( JitsiTrackErrors.PERMISSION_DENIED ).toBe( 'gum.permission_denied' );
43
+            expect( JitsiTrackErrors.SCREENSHARING_GENERIC_ERROR ).toBe( 'gum.screensharing_generic_error' );
44
+            expect( JitsiTrackErrors.SCREENSHARING_USER_CANCELED ).toBe( 'gum.screensharing_user_canceled' );
45
+            expect( JitsiTrackErrors.TIMEOUT ).toBe( 'gum.timeout' );
46
+            expect( JitsiTrackErrors.TRACK_IS_DISPOSED ).toBe( 'track.track_is_disposed' );
47
+            expect( JitsiTrackErrors.TRACK_NO_STREAM_FOUND ).toBe( 'track.no_stream_found' );
48
+            expect( JitsiTrackErrors.UNSUPPORTED_RESOLUTION ).toBe( 'gum.unsupported_resolution' );
49
+        }
50
+    } );
51
+
52
+    it( "unknown members", () => {
53
+        const keys = Object.keys( others );
54
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
55
+    } );
56
+} );

+ 41
- 0
JitsiTrackEvents.spec.ts View File

@@ -0,0 +1,41 @@
1
+import * as exported from "./JitsiTrackEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiTrackEvents members", () => {
6
+    const {
7
+        LOCAL_TRACK_STOPPED,
8
+        TRACK_AUDIO_LEVEL_CHANGED,
9
+        TRACK_AUDIO_OUTPUT_CHANGED,
10
+        TRACK_MUTE_CHANGED,
11
+        TRACK_VIDEOTYPE_CHANGED,
12
+        NO_DATA_FROM_SOURCE,
13
+        NO_AUDIO_INPUT,
14
+        JitsiTrackEvents,
15
+        ...others
16
+    } = exported as any; // TODO: remove cast after typescript conversion
17
+
18
+    it( "known members", () => {
19
+        expect( LOCAL_TRACK_STOPPED ).toBe( 'track.stopped' );
20
+        expect( TRACK_AUDIO_LEVEL_CHANGED ).toBe( 'track.audioLevelsChanged' );
21
+        expect( TRACK_AUDIO_OUTPUT_CHANGED ).toBe( 'track.audioOutputChanged' );
22
+        expect( TRACK_MUTE_CHANGED ).toBe( 'track.trackMuteChanged' );
23
+        expect( TRACK_VIDEOTYPE_CHANGED ).toBe( 'track.videoTypeChanged' );
24
+        expect( NO_DATA_FROM_SOURCE ).toBe( 'track.no_data_from_source' );
25
+        expect( NO_AUDIO_INPUT ).toBe( 'track.no_audio_input' );
26
+        if ( JitsiTrackEvents ) {
27
+            expect( JitsiTrackEvents.LOCAL_TRACK_STOPPED ).toBe( 'track.stopped' );
28
+            expect( JitsiTrackEvents.TRACK_AUDIO_LEVEL_CHANGED ).toBe( 'track.audioLevelsChanged' );
29
+            expect( JitsiTrackEvents.TRACK_AUDIO_OUTPUT_CHANGED ).toBe( 'track.audioOutputChanged' );
30
+            expect( JitsiTrackEvents.TRACK_MUTE_CHANGED ).toBe( 'track.trackMuteChanged' );
31
+            expect( JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED ).toBe( 'track.videoTypeChanged' );
32
+            expect( JitsiTrackEvents.NO_DATA_FROM_SOURCE ).toBe( 'track.no_data_from_source' );
33
+            expect( JitsiTrackEvents.NO_AUDIO_INPUT ).toBe( 'track.no_audio_input' );
34
+        }
35
+    } );
36
+
37
+    it( "unknown members", () => {
38
+        const keys = Object.keys( others );
39
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
40
+    } );
41
+} );

+ 26
- 0
JitsiTranscriptionStatus.spec.ts View File

@@ -0,0 +1,26 @@
1
+import * as exported from "./JitsiTranscriptionStatus";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/JitsiTranscriptionStatus members", () => {
6
+    const {
7
+        ON,
8
+        OFF,
9
+        JitsiTranscriptionStatus,
10
+        ...others
11
+    } = exported as any; // TODO: remove cast after typescript conversion
12
+
13
+    it( "known members", () => {
14
+        expect( ON ).toBe( 'on' );
15
+        expect( OFF ).toBe( 'off' );
16
+        if ( JitsiTranscriptionStatus ) {
17
+            expect( JitsiTranscriptionStatus.ON ).toBe( 'on' );
18
+            expect( JitsiTranscriptionStatus.OFF ).toBe( 'off' );
19
+        }
20
+    } );
21
+
22
+    it( "unknown members", () => {
23
+        const keys = Object.keys( others );
24
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
25
+    } );
26
+} );

+ 6
- 2
karma.conf.js View File

@@ -16,7 +16,10 @@ module.exports = function(config) {
16 16
         files: [
17 17
             'https://code.jquery.com/jquery-3.5.1.min.js',
18 18
             'node_modules/core-js/index.js',
19
-            './modules/**/*.spec.js'
19
+            './modules/**/*.spec.js',
20
+            './modules/**/*.spec.ts',
21
+            './service/**/*.spec.ts',
22
+            './*.spec.ts'
20 23
         ],
21 24
 
22 25
         // list of files to exclude
@@ -28,7 +31,8 @@ module.exports = function(config) {
28 31
         //  https://npmjs.org/browse/keyword/karma-preprocessor
29 32
         preprocessors: {
30 33
             'node_modules/core-js/**': [ 'webpack' ],
31
-            './**/*.spec.js': [ 'webpack', 'sourcemap' ]
34
+            './**/*.spec.js': [ 'webpack', 'sourcemap' ],
35
+            './**/*.spec.ts': [ 'webpack', 'sourcemap' ]
32 36
         },
33 37
 
34 38
         // test results reporter to use

+ 41
- 0
modules/detection/DetectionEvents.spec.ts View File

@@ -0,0 +1,41 @@
1
+import * as exported from "./DetectionEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/modules/detection/DetectionEvents members", () => {
6
+    const {
7
+        DETECTOR_STATE_CHANGE,
8
+        AUDIO_INPUT_STATE_CHANGE,
9
+        NO_AUDIO_INPUT,
10
+        VAD_NOISY_DEVICE,
11
+        VAD_REPORT_PUBLISHED,
12
+        VAD_SCORE_PUBLISHED,
13
+        VAD_TALK_WHILE_MUTED,
14
+        DetectionEvents,
15
+        ...others
16
+    } = exported as any; // TODO: remove cast after typescript conversion
17
+
18
+    it( "known members", () => {
19
+        expect( DETECTOR_STATE_CHANGE ).toBe( 'detector_state_change' );
20
+        expect( AUDIO_INPUT_STATE_CHANGE ).toBe( 'audio_input_state_changed' );
21
+        expect( NO_AUDIO_INPUT ).toBe( 'no_audio_input_detected' );
22
+        expect( VAD_NOISY_DEVICE ).toBe( 'detection.vad_noise_device' );
23
+        expect( VAD_REPORT_PUBLISHED ).toBe( 'vad-report-published' );
24
+        expect( VAD_SCORE_PUBLISHED ).toBe( 'detection.vad_score_published' );
25
+        expect( VAD_TALK_WHILE_MUTED ).toBe( 'detection.vad_talk_while_muted' );
26
+        if ( DetectionEvents ) {
27
+            expect( DetectionEvents.DETECTOR_STATE_CHANGE ).toBe( 'detector_state_change' );
28
+            expect( DetectionEvents.AUDIO_INPUT_STATE_CHANGE ).toBe( 'audio_input_state_changed' );
29
+            expect( DetectionEvents.NO_AUDIO_INPUT ).toBe( 'no_audio_input_detected' );
30
+            expect( DetectionEvents.VAD_NOISY_DEVICE ).toBe( 'detection.vad_noise_device' );
31
+            expect( DetectionEvents.VAD_REPORT_PUBLISHED ).toBe( 'vad-report-published' );
32
+            expect( DetectionEvents.VAD_SCORE_PUBLISHED ).toBe( 'detection.vad_score_published' );
33
+            expect( DetectionEvents.VAD_TALK_WHILE_MUTED ).toBe( 'detection.vad_talk_while_muted' );
34
+        }
35
+    } );
36
+
37
+    it( "unknown members", () => {
38
+        const keys = Object.keys( others );
39
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
40
+    } );
41
+} );

+ 29
- 0
modules/proxyconnection/constants.spec.ts View File

@@ -0,0 +1,29 @@
1
+import { ACTIONS } from "./constants";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "modules/proxyconnection/constants members", () => {
6
+    const {
7
+        ACCEPT,
8
+        CONNECTION_ERROR,
9
+        INITIATE,
10
+        TERMINATE,
11
+        TRANSPORT_INFO,
12
+        UNAVAILABLE,
13
+        ...others
14
+    } = ACTIONS as any; // TODO: remove cast after typescript conversion
15
+
16
+    it( "known members", () => {
17
+        expect( ACCEPT ).toBe( 'session-accept' );
18
+        expect( CONNECTION_ERROR ).toBe( 'connection-error-encountered' );
19
+        expect( INITIATE ).toBe( 'session-initiate' );
20
+        expect( TERMINATE ).toBe( 'session-terminate' );
21
+        expect( TRANSPORT_INFO ).toBe( 'transport-info' );
22
+        expect( UNAVAILABLE ).toBe( 'unavailable' );
23
+    } );
24
+
25
+    it( "unknown members", () => {
26
+        const keys = Object.keys( others );
27
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
28
+    } );
29
+} );

+ 52
- 0
modules/videosipgw/VideoSIPGWConstants.spec.ts View File

@@ -0,0 +1,52 @@
1
+import * as exported from "./VideoSIPGWConstants";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/modules/videosipgw/VideoSIPGWConstants members", () => {
6
+    const {
7
+        STATUS_AVAILABLE,
8
+        STATUS_UNDEFINED,
9
+        STATUS_BUSY,
10
+        STATE_ON,
11
+        STATE_OFF,
12
+        STATE_PENDING,
13
+        STATE_RETRYING,
14
+        STATE_FAILED,
15
+        ERROR_NO_CONNECTION,
16
+        ERROR_SESSION_EXISTS,
17
+        VideoSIPGWStatusConstants,
18
+        VideoSIPGWStateConstants,
19
+        VideoSIPGWErrorConstants,
20
+        ...others
21
+    } = exported as any; // TODO: remove cast after typescript conversion
22
+
23
+    it( "known members", () => {
24
+        expect( STATUS_AVAILABLE ).toBe( 'available' );
25
+        expect( STATUS_UNDEFINED ).toBe( 'undefined' );
26
+        expect( STATUS_BUSY ).toBe( 'busy' );
27
+        expect( STATE_ON ).toBe( 'on' );
28
+        expect( STATE_OFF ).toBe( 'off' );
29
+        expect( STATE_PENDING ).toBe( 'pending' );
30
+        expect( STATE_RETRYING ).toBe( 'retrying' );
31
+        expect( STATE_FAILED ).toBe( 'failed' );
32
+        expect( ERROR_NO_CONNECTION ).toBe( 'error_no_connection' );
33
+        expect( ERROR_SESSION_EXISTS ).toBe( 'error_session_already_exists' );
34
+        if ( VideoSIPGWStatusConstants ) {
35
+            expect( VideoSIPGWStatusConstants.STATUS_AVAILABLE ).toBe( 'available' );
36
+            expect( VideoSIPGWStatusConstants.STATUS_UNDEFINED ).toBe( 'undefined' );
37
+            expect( VideoSIPGWStatusConstants.STATUS_BUSY ).toBe( 'busy' );
38
+            expect( VideoSIPGWStateConstants.STATE_ON ).toBe( 'on' );
39
+            expect( VideoSIPGWStateConstants.STATE_OFF ).toBe( 'off' );
40
+            expect( VideoSIPGWStateConstants.STATE_PENDING ).toBe( 'pending' );
41
+            expect( VideoSIPGWStateConstants.STATE_RETRYING ).toBe( 'retrying' );
42
+            expect( VideoSIPGWStateConstants.STATE_FAILED ).toBe( 'failed' );
43
+            expect( VideoSIPGWErrorConstants.ERROR_NO_CONNECTION ).toBe( 'error_no_connection' );
44
+            expect( VideoSIPGWErrorConstants.ERROR_SESSION_EXISTS ).toBe( 'error_session_already_exists' );
45
+        }
46
+    } );
47
+
48
+    it( "unknown members", () => {
49
+        const keys = Object.keys( others );
50
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
51
+    } );
52
+} );

+ 29
- 0
modules/xmpp/JingleSessionState.spec.ts View File

@@ -0,0 +1,29 @@
1
+import * as exported from "./JingleSessionState";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/modules/xmpp/JingleSessionState members", () => {
6
+    const {
7
+        PENDING,
8
+        ACTIVE,
9
+        ENDED,
10
+        JingleSessionState,
11
+        ...others
12
+    } = exported as any; // TODO: remove cast after typescript conversion
13
+
14
+    it( "known members", () => {
15
+        expect( PENDING ).toBe( 'pending' );
16
+        expect( ACTIVE ).toBe( 'active' );
17
+        expect( ENDED ).toBe( 'ended' );
18
+        if ( JingleSessionState ) {
19
+            expect( JingleSessionState.PENDING ).toBe( 'pending' );
20
+            expect( JingleSessionState.ACTIVE ).toBe( 'active' );
21
+            expect( JingleSessionState.ENDED ).toBe( 'ended' );
22
+        }
23
+    } );
24
+
25
+    it( "unknown members", () => {
26
+        const keys = Object.keys( others );
27
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
28
+    } );
29
+} );

+ 23
- 0
modules/xmpp/MediaSessionEvents.spec.ts View File

@@ -0,0 +1,23 @@
1
+import { default as exported } from "./MediaSessionEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/modules/xmpp/MediaSessionEvents members", () => {
6
+    const {
7
+        REMOTE_VIDEO_CONSTRAINTS_CHANGED,
8
+        MediaSessionEvents,
9
+        ...others
10
+    } = exported as any; // TODO: remove cast after typescript conversion
11
+
12
+    it( "known members", () => {
13
+        expect( REMOTE_VIDEO_CONSTRAINTS_CHANGED ).toBe( 'media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED' );
14
+        if ( MediaSessionEvents ) {
15
+            expect( MediaSessionEvents.REMOTE_VIDEO_CONSTRAINTS_CHANGED ).toBe( 'media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED' );
16
+        }
17
+    } );
18
+
19
+    it( "unknown members", () => {
20
+        const keys = Object.keys( others );
21
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
22
+    } );
23
+} );

+ 13
- 0
package-lock.json View File

@@ -33,6 +33,7 @@
33 33
         "@babel/preset-env": "7.16.0",
34 34
         "@babel/preset-typescript": "7.16.7",
35 35
         "@jitsi/eslint-config": "4.0.0",
36
+        "@types/jasmine": "3.10.3",
36 37
         "@types/sdp-transform": "2.4.5",
37 38
         "babel-loader": "8.2.3",
38 39
         "core-js": "3.19.1",
@@ -2024,6 +2025,12 @@
2024 2025
       "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
2025 2026
       "dev": true
2026 2027
     },
2028
+    "node_modules/@types/jasmine": {
2029
+      "version": "3.10.3",
2030
+      "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.10.3.tgz",
2031
+      "integrity": "sha512-SWyMrjgdAUHNQmutvDcKablrJhkDLy4wunTme8oYLjKp41GnHGxMRXr2MQMvy/qy8H3LdzwQk9gH4hZ6T++H8g==",
2032
+      "dev": true
2033
+    },
2027 2034
     "node_modules/@types/json-schema": {
2028 2035
       "version": "7.0.9",
2029 2036
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
@@ -8373,6 +8380,12 @@
8373 8380
       "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==",
8374 8381
       "dev": true
8375 8382
     },
8383
+    "@types/jasmine": {
8384
+      "version": "3.10.3",
8385
+      "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-3.10.3.tgz",
8386
+      "integrity": "sha512-SWyMrjgdAUHNQmutvDcKablrJhkDLy4wunTme8oYLjKp41GnHGxMRXr2MQMvy/qy8H3LdzwQk9gH4hZ6T++H8g==",
8387
+      "dev": true
8388
+    },
8376 8389
     "@types/json-schema": {
8377 8390
       "version": "7.0.9",
8378 8391
       "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",

+ 1
- 0
package.json View File

@@ -40,6 +40,7 @@
40 40
     "@babel/preset-env": "7.16.0",
41 41
     "@babel/preset-typescript": "7.16.7",
42 42
     "@jitsi/eslint-config": "4.0.0",
43
+    "@types/jasmine": "3.10.3",
43 44
     "@types/sdp-transform": "2.4.5",
44 45
     "babel-loader": "8.2.3",
45 46
     "core-js": "3.19.1",

+ 32
- 0
service/RTC/BridgeVideoType.spec.ts View File

@@ -0,0 +1,32 @@
1
+import * as exported from "./BridgeVideoType";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/BridgeVideoType members", () => {
6
+    const {
7
+        CAMERA,
8
+        DESKTOP,
9
+        DESKTOP_HIGH_FPS,
10
+        NONE,
11
+        BridgeVideoType,
12
+        ...others
13
+    } = exported as any; // TODO: remove cast after typescript conversion
14
+
15
+    it( "known members", () => {
16
+        expect( CAMERA ).toBe( 'camera' );
17
+        expect( DESKTOP ).toBe( 'desktop' );
18
+        expect( DESKTOP_HIGH_FPS ).toBe( 'desktop_high_fps' );
19
+        expect( NONE ).toBe( 'none' );
20
+        if ( BridgeVideoType ) {
21
+            expect( BridgeVideoType.CAMERA ).toBe( 'camera' );
22
+            expect( BridgeVideoType.DESKTOP ).toBe( 'desktop' );
23
+            expect( BridgeVideoType.DESKTOP_HIGH_FPS ).toBe( 'desktop_high_fps' );
24
+            expect( BridgeVideoType.NONE ).toBe( 'none' );
25
+        }
26
+    } );
27
+
28
+    it( "unknown members", () => {
29
+        const keys = Object.keys( others );
30
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
31
+    } );
32
+} );

+ 26
- 0
service/RTC/CameraFacingMode.spec.ts View File

@@ -0,0 +1,26 @@
1
+import * as exported from "./CameraFacingMode";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/CameraFacingMode members", () => {
6
+    const {
7
+        ENVIRONMENT,
8
+        USER,
9
+        CameraFacingMode,
10
+        ...others
11
+    } = exported as any; // TODO: remove cast after typescript conversion
12
+
13
+    it( "known members", () => {
14
+        expect( ENVIRONMENT ).toBe( 'environment' );
15
+        expect( USER ).toBe( 'user' );
16
+        if ( CameraFacingMode ) {
17
+            expect( CameraFacingMode.ENVIRONMENT ).toBe( 'environment' );
18
+            expect( CameraFacingMode.USER ).toBe( 'user' );
19
+        }
20
+    } );
21
+
22
+    it( "unknown members", () => {
23
+        const keys = Object.keys( others );
24
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
25
+    } );
26
+} );

+ 35
- 0
service/RTC/CodecMimeType.spec.ts View File

@@ -0,0 +1,35 @@
1
+import * as exported from "./CodecMimeType";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/CodecMimeType members", () => {
6
+    const {
7
+        H264,
8
+        OPUS,
9
+        ULPFEC,
10
+        VP8,
11
+        VP9,
12
+        CodecMimeType,
13
+        ...others
14
+    } = exported as any; // TODO: remove cast after typescript conversion
15
+
16
+    it( "known members", () => {
17
+        expect( H264 ).toBe( 'h264' );
18
+        expect( OPUS ).toBe( 'opus' );
19
+        expect( ULPFEC ).toBe( 'ulpfec' );
20
+        expect( VP8 ).toBe( 'vp8' );
21
+        expect( VP9 ).toBe( 'vp9' );
22
+        if ( CodecMimeType ) {
23
+            expect( CodecMimeType.H264 ).toBe( 'h264' );
24
+            expect( CodecMimeType.OPUS ).toBe( 'opus' );
25
+            expect( CodecMimeType.ULPFEC ).toBe( 'ulpfec' );
26
+            expect( CodecMimeType.VP8 ).toBe( 'vp8' );
27
+            expect( CodecMimeType.VP9 ).toBe( 'vp9' );
28
+        }
29
+    } );
30
+
31
+    it( "unknown members", () => {
32
+        const keys = Object.keys( others );
33
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
34
+    } );
35
+} );

+ 32
- 0
service/RTC/MediaDirection.spec.ts View File

@@ -0,0 +1,32 @@
1
+import * as exported from "./MediaDirection";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/MediaDirection members", () => {
6
+    const {
7
+        INACTIVE,
8
+        RECVONLY,
9
+        SENDONLY,
10
+        SENDRECV,
11
+        MediaDirection,
12
+        ...others
13
+    } = exported as any; // TODO: remove cast after typescript conversion
14
+
15
+    it( "known members", () => {
16
+        expect( INACTIVE ).toBe( 'inactive' );
17
+        expect( RECVONLY ).toBe( 'recvonly' );
18
+        expect( SENDONLY ).toBe( 'sendonly' );
19
+        expect( SENDRECV ).toBe( 'sendrecv' );
20
+        if ( MediaDirection ) {
21
+            expect( MediaDirection.INACTIVE ).toBe( 'inactive' );
22
+            expect( MediaDirection.RECVONLY ).toBe( 'recvonly' );
23
+            expect( MediaDirection.SENDONLY ).toBe( 'sendonly' );
24
+            expect( MediaDirection.SENDRECV ).toBe( 'sendrecv' );
25
+        }
26
+    } );
27
+
28
+    it( "unknown members", () => {
29
+        const keys = Object.keys( others );
30
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
31
+    } );
32
+} );

+ 29
- 0
service/RTC/MediaType.spec.ts View File

@@ -0,0 +1,29 @@
1
+import * as exported from "./MediaType";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/MediaType members", () => {
6
+    const {
7
+        AUDIO,
8
+        PRESENTER,
9
+        VIDEO,
10
+        MediaType,
11
+        ...others
12
+    } = exported as any; // TODO: remove cast after typescript conversion
13
+
14
+    it( "known members", () => {
15
+        expect( AUDIO ).toBe( 'audio' );
16
+        expect( PRESENTER ).toBe( 'presenter' );
17
+        expect( VIDEO ).toBe( 'video' );
18
+        if ( MediaType ) {
19
+            expect( MediaType.AUDIO ).toBe( 'audio' );
20
+            expect( MediaType.PRESENTER ).toBe( 'presenter' );
21
+            expect( MediaType.VIDEO ).toBe( 'video' );
22
+        }
23
+    } );
24
+
25
+    it( "unknown members", () => {
26
+        const keys = Object.keys( others );
27
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
28
+    } );
29
+} );

+ 98
- 0
service/RTC/RTCEvents.spec.ts View File

@@ -0,0 +1,98 @@
1
+import * as exported from "./RTCEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/RTCEvents members", () => {
6
+    const {
7
+        CREATE_ANSWER_FAILED,
8
+        CREATE_OFFER_FAILED,
9
+        DATA_CHANNEL_OPEN,
10
+        ENDPOINT_CONN_STATUS_CHANGED,
11
+        DOMINANT_SPEAKER_CHANGED,
12
+        LASTN_ENDPOINT_CHANGED,
13
+        PERMISSIONS_CHANGED,
14
+        SENDER_VIDEO_CONSTRAINTS_CHANGED,
15
+        LASTN_VALUE_CHANGED,
16
+        LOCAL_TRACK_SSRC_UPDATED,
17
+        LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,
18
+        TRACK_ATTACHED,
19
+        REMOTE_TRACK_ADDED,
20
+        REMOTE_TRACK_MUTE,
21
+        REMOTE_TRACK_REMOVED,
22
+        REMOTE_TRACK_UNMUTE,
23
+        SET_LOCAL_DESCRIPTION_FAILED,
24
+        SET_REMOTE_DESCRIPTION_FAILED,
25
+        AUDIO_OUTPUT_DEVICE_CHANGED,
26
+        DEVICE_LIST_CHANGED,
27
+        DEVICE_LIST_WILL_CHANGE,
28
+        DEVICE_LIST_AVAILABLE,
29
+        ENDPOINT_MESSAGE_RECEIVED,
30
+        ENDPOINT_STATS_RECEIVED,
31
+        LOCAL_UFRAG_CHANGED,
32
+        REMOTE_UFRAG_CHANGED,
33
+        RTCEvents,
34
+        ...others
35
+    } = exported as any; // TODO: remove cast after typescript conversion
36
+
37
+    it( "known members", () => {
38
+        expect( CREATE_ANSWER_FAILED ).toBe( 'rtc.create_answer_failed' );
39
+        expect( CREATE_OFFER_FAILED ).toBe( 'rtc.create_offer_failed' );
40
+        expect( DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
41
+        expect( ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
42
+        expect( DOMINANT_SPEAKER_CHANGED ).toBe( 'rtc.dominant_speaker_changed' );
43
+        expect( LASTN_ENDPOINT_CHANGED ).toBe( 'rtc.lastn_endpoint_changed' );
44
+        expect( PERMISSIONS_CHANGED ).toBe( 'rtc.permissions_changed' );
45
+        expect( SENDER_VIDEO_CONSTRAINTS_CHANGED ).toBe( 'rtc.sender_video_constraints_changed' );
46
+        expect( LASTN_VALUE_CHANGED ).toBe( 'rtc.lastn_value_changed' );
47
+        expect( LOCAL_TRACK_SSRC_UPDATED ).toBe( 'rtc.local_track_ssrc_updated' );
48
+        expect( LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED ).toBe( 'rtc.local_track_max_enabled_resolution_changed' );
49
+        expect( TRACK_ATTACHED ).toBe( 'rtc.track_attached' );
50
+        expect( REMOTE_TRACK_ADDED ).toBe( 'rtc.remote_track_added' );
51
+        expect( REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
52
+        expect( REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
53
+        expect( REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
54
+        expect( SET_LOCAL_DESCRIPTION_FAILED ).toBe( 'rtc.set_local_description_failed' );
55
+        expect( SET_REMOTE_DESCRIPTION_FAILED ).toBe( 'rtc.set_remote_description_failed' );
56
+        expect( AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
57
+        expect( DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
58
+        expect( DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
59
+        expect( DEVICE_LIST_AVAILABLE ).toBe( 'rtc.device_list_available' );
60
+        expect( ENDPOINT_MESSAGE_RECEIVED ).toBe( 'rtc.endpoint_message_received' );
61
+        expect( ENDPOINT_STATS_RECEIVED ).toBe( 'rtc.endpoint_stats_received' );
62
+        expect( LOCAL_UFRAG_CHANGED ).toBe( 'rtc.local_ufrag_changed' );
63
+        expect( REMOTE_UFRAG_CHANGED ).toBe( 'rtc.remote_ufrag_changed' );
64
+        if ( RTCEvents ) {
65
+            expect( RTCEvents.CREATE_ANSWER_FAILED ).toBe( 'rtc.create_answer_failed' );
66
+            expect( RTCEvents.CREATE_OFFER_FAILED ).toBe( 'rtc.create_offer_failed' );
67
+            expect( RTCEvents.DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
68
+            expect( RTCEvents.ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
69
+            expect( RTCEvents.DOMINANT_SPEAKER_CHANGED ).toBe( 'rtc.dominant_speaker_changed' );
70
+            expect( RTCEvents.LASTN_ENDPOINT_CHANGED ).toBe( 'rtc.lastn_endpoint_changed' );
71
+            expect( RTCEvents.PERMISSIONS_CHANGED ).toBe( 'rtc.permissions_changed' );
72
+            expect( RTCEvents.SENDER_VIDEO_CONSTRAINTS_CHANGED ).toBe( 'rtc.sender_video_constraints_changed' );
73
+            expect( RTCEvents.LASTN_VALUE_CHANGED ).toBe( 'rtc.lastn_value_changed' );
74
+            expect( RTCEvents.LOCAL_TRACK_SSRC_UPDATED ).toBe( 'rtc.local_track_ssrc_updated' );
75
+            expect( RTCEvents.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED ).toBe( 'rtc.local_track_max_enabled_resolution_changed' );
76
+            expect( RTCEvents.TRACK_ATTACHED ).toBe( 'rtc.track_attached' );
77
+            expect( RTCEvents.REMOTE_TRACK_ADDED ).toBe( 'rtc.remote_track_added' );
78
+            expect( RTCEvents.REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
79
+            expect( RTCEvents.REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
80
+            expect( RTCEvents.REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
81
+            expect( RTCEvents.SET_LOCAL_DESCRIPTION_FAILED ).toBe( 'rtc.set_local_description_failed' );
82
+            expect( RTCEvents.SET_REMOTE_DESCRIPTION_FAILED ).toBe( 'rtc.set_remote_description_failed' );
83
+            expect( RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
84
+            expect( RTCEvents.DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
85
+            expect( RTCEvents.DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
86
+            expect( RTCEvents.DEVICE_LIST_AVAILABLE ).toBe( 'rtc.device_list_available' );
87
+            expect( RTCEvents.ENDPOINT_MESSAGE_RECEIVED ).toBe( 'rtc.endpoint_message_received' );
88
+            expect( RTCEvents.ENDPOINT_STATS_RECEIVED ).toBe( 'rtc.endpoint_stats_received' );
89
+            expect( RTCEvents.LOCAL_UFRAG_CHANGED ).toBe( 'rtc.local_ufrag_changed' );
90
+            expect( RTCEvents.REMOTE_UFRAG_CHANGED ).toBe( 'rtc.remote_ufrag_changed' );
91
+        }
92
+    } );
93
+
94
+    it( "unknown members", () => {
95
+        const keys = Object.keys( others );
96
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
97
+    } );
98
+} );

+ 43
- 0
service/RTC/Resolutions.spec.ts View File

@@ -0,0 +1,43 @@
1
+import * as exported from "./Resolutions";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/Resolutions members", () => {
6
+    const {
7
+        '2160': R2160,
8
+        '4k': R4k,
9
+        '1080': R1080,
10
+        fullhd,
11
+        '720': R720,
12
+        hd,
13
+        '540': R540,
14
+        qhd,
15
+        '480': R480,
16
+        vga,
17
+        '360': R360,
18
+        '240': R240,
19
+        '180': R180,
20
+        ...others
21
+    } = exported as any;
22
+
23
+    it( "known members", () => {
24
+        expect( R2160 ).toEqual( { width: 3840, height: 2160 } );
25
+        expect( R4k ).toEqual( { width: 3840, height: 2160 } );
26
+        expect( R1080 ).toEqual( { width: 1920, height: 1080 } );
27
+        expect( fullhd ).toEqual( { width: 1920, height: 1080 } );
28
+        expect( R720 ).toEqual( { width: 1280, height: 720 } );
29
+        expect( hd ).toEqual( { width: 1280, height: 720 } );
30
+        expect( R540 ).toEqual( { width: 960, height: 540 } );
31
+        expect( qhd ).toEqual( { width: 960, height: 540 } );
32
+        expect( R480 ).toEqual( { width: 640, height: 480 } );
33
+        expect( vga ).toEqual( { width: 640, height: 480 } );
34
+        expect( R360 ).toEqual( { width: 640, height: 360 } );
35
+        expect( R240 ).toEqual( { width: 320, height: 240 } );
36
+        expect( R180 ).toEqual( { width: 320, height: 180 } );
37
+    } );
38
+
39
+    it( "unknown members", () => {
40
+        const keys = Object.keys( others );
41
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
42
+    } );
43
+} );

+ 26
- 0
service/RTC/SignalingEvents.spec.ts View File

@@ -0,0 +1,26 @@
1
+import * as exported from "./SignalingEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/SignalingEvents members", () => {
6
+    const {
7
+        PEER_MUTED_CHANGED,
8
+        PEER_VIDEO_TYPE_CHANGED,
9
+        SignalingEvents,
10
+        ...others
11
+    } = exported as any; // TODO: remove cast after typescript conversion
12
+
13
+    it( "known members", () => {
14
+        expect( PEER_MUTED_CHANGED ).toBe( 'signaling.peerMuted' );
15
+        expect( PEER_VIDEO_TYPE_CHANGED ).toBe( 'signaling.peerVideoType' );
16
+        if ( SignalingEvents ) {
17
+            expect( SignalingEvents.PEER_MUTED_CHANGED ).toBe( 'signaling.peerMuted' );
18
+            expect( SignalingEvents.PEER_VIDEO_TYPE_CHANGED ).toBe( 'signaling.peerVideoType' );
19
+        }
20
+    } );
21
+
22
+    it( "unknown members", () => {
23
+        const keys = Object.keys( others );
24
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
25
+    } );
26
+} );

+ 38
- 0
service/RTC/StreamEventTypes.spec.ts View File

@@ -0,0 +1,38 @@
1
+import * as exported from "./StreamEventTypes";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/StreamEventTypes members", () => {
6
+    const {
7
+        EVENT_TYPE_LOCAL_CREATED,
8
+        EVENT_TYPE_LOCAL_CHANGED,
9
+        EVENT_TYPE_LOCAL_ENDED,
10
+        EVENT_TYPE_REMOTE_CREATED,
11
+        EVENT_TYPE_REMOTE_ENDED,
12
+        TRACK_MUTE_CHANGED,
13
+        StreamEventTypes,
14
+        ...others
15
+    } = exported as any; // TODO: remove cast after typescript conversion
16
+
17
+    it( "known members", () => {
18
+        expect( EVENT_TYPE_LOCAL_CREATED ).toBe( 'stream.local_created' );
19
+        expect( EVENT_TYPE_LOCAL_CHANGED ).toBe( 'stream.local_changed' );
20
+        expect( EVENT_TYPE_LOCAL_ENDED ).toBe( 'stream.local_ended' );
21
+        expect( EVENT_TYPE_REMOTE_CREATED ).toBe( 'stream.remote_created' );
22
+        expect( EVENT_TYPE_REMOTE_ENDED ).toBe( 'stream.remote_ended' );
23
+        expect( TRACK_MUTE_CHANGED ).toBe( 'rtc.track_mute_changed' );
24
+        if ( StreamEventTypes ) {
25
+            expect( StreamEventTypes.EVENT_TYPE_LOCAL_CREATED ).toBe( 'stream.local_created' );
26
+            expect( StreamEventTypes.EVENT_TYPE_LOCAL_CHANGED ).toBe( 'stream.local_changed' );
27
+            expect( StreamEventTypes.EVENT_TYPE_LOCAL_ENDED ).toBe( 'stream.local_ended' );
28
+            expect( StreamEventTypes.EVENT_TYPE_REMOTE_CREATED ).toBe( 'stream.remote_created' );
29
+            expect( StreamEventTypes.EVENT_TYPE_REMOTE_ENDED ).toBe( 'stream.remote_ended' );
30
+            expect( StreamEventTypes.TRACK_MUTE_CHANGED ).toBe( 'rtc.track_mute_changed' );
31
+        }
32
+    } );
33
+
34
+    it( "unknown members", () => {
35
+        const keys = Object.keys( others );
36
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
37
+    } );
38
+} );

+ 26
- 0
service/RTC/VideoType.spec.ts View File

@@ -0,0 +1,26 @@
1
+import * as exported from "./VideoType";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/RTC/VideoType members", () => {
6
+    const {
7
+        CAMERA,
8
+        DESKTOP,
9
+        VideoType,
10
+        ...others
11
+    } = exported as any; // TODO: remove cast after typescript conversion
12
+
13
+    it( "known members", () => {
14
+        expect( CAMERA ).toBe( 'camera' );
15
+        expect( DESKTOP ).toBe( 'desktop' );
16
+        if ( VideoType ) {
17
+            expect( VideoType.CAMERA ).toBe( 'camera' );
18
+            expect( VideoType.DESKTOP ).toBe( 'desktop' );
19
+        }
20
+    } );
21
+
22
+    it( "unknown members", () => {
23
+        const keys = Object.keys( others );
24
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
25
+    } );
26
+} );

+ 23
- 0
service/authentication/AuthenticationEvents.spec.ts View File

@@ -0,0 +1,23 @@
1
+import * as exported from "./AuthenticationEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/authentication/AuthenticationEvents members", () => {
6
+    const {
7
+        IDENTITY_UPDATED,
8
+        AuthenticationEvents,
9
+        ...others
10
+    } = exported as any; // TODO: remove cast after typescript conversion
11
+
12
+    it( "known members", () => {
13
+        expect( IDENTITY_UPDATED ).toBe( 'authentication.identity_updated' );
14
+        if ( AuthenticationEvents ) {
15
+            expect( AuthenticationEvents.IDENTITY_UPDATED ).toBe( 'authentication.identity_updated' );
16
+        }
17
+    } );
18
+
19
+    it( "unknown members", () => {
20
+        const keys = Object.keys( others );
21
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
22
+    } );
23
+} );

+ 26
- 0
service/connectivity/ConnectionQualityEvents.spec.ts View File

@@ -0,0 +1,26 @@
1
+import * as exported from "./ConnectionQualityEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/connectivity/ConnectionQualityEvents members", () => {
6
+    const {
7
+        LOCAL_STATS_UPDATED = 'cq.local_stats_updated',
8
+        REMOTE_STATS_UPDATED,
9
+        ConnectionQualityEvents,
10
+        ...others
11
+    } = exported as any; // TODO: remove cast after typescript conversion
12
+
13
+    it( "known members", () => {
14
+        expect( LOCAL_STATS_UPDATED ).toBe( 'cq.local_stats_updated' );
15
+        expect( REMOTE_STATS_UPDATED ).toBe( 'cq.remote_stats_updated' );
16
+        if ( ConnectionQualityEvents ) {
17
+            expect( ConnectionQualityEvents.LOCAL_STATS_UPDATED ).toBe( 'cq.local_stats_updated' );
18
+            expect( ConnectionQualityEvents.REMOTE_STATS_UPDATED ).toBe( 'cq.remote_stats_updated' );
19
+        }
20
+    } );
21
+
22
+    it( "unknown members", () => {
23
+        const keys = Object.keys( others );
24
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
25
+    } );
26
+} );

+ 23
- 0
service/e2eping/E2ePingEvents.spec.ts View File

@@ -0,0 +1,23 @@
1
+import * as exported from "./E2ePingEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/e2eping/E2ePingEvents members", () => {
6
+    const {
7
+        E2E_RTT_CHANGED,
8
+        E2ePingEvents,
9
+        ...others
10
+    } = exported as any; // TODO: remove cast after typescript conversion
11
+
12
+    it( "known members", () => {
13
+        expect( E2E_RTT_CHANGED ).toBe( 'e2eping.e2e_rtt_changed' );
14
+        if ( E2ePingEvents ) {
15
+            expect( E2ePingEvents.E2E_RTT_CHANGED ).toBe( 'e2eping.e2e_rtt_changed' );
16
+        }
17
+    } );
18
+
19
+    it( "unknown members", () => {
20
+        const keys = Object.keys( others );
21
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
22
+    } );
23
+} );

+ 100
- 0
service/statistics/AnalyticsEvents.spec.ts View File

@@ -0,0 +1,100 @@
1
+import * as exported from "./AnalyticsEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/statistics/AnalyticsEvents members", () => {
6
+    const {
7
+        TYPE_OPERATIONAL,
8
+        TYPE_PAGE,
9
+        TYPE_TRACK,
10
+        TYPE_UI,
11
+        ACTION_JINGLE_RESTART,
12
+        ACTION_JINGLE_SA_TIMEOUT,
13
+        ACTION_JINGLE_SI_RECEIVED,
14
+        ACTION_JINGLE_SI_TIMEOUT,
15
+        ACTION_JINGLE_TERMINATE,
16
+        ACTION_JINGLE_TR_RECEIVED,
17
+        ACTION_JINGLE_TR_SUCCESS,
18
+        ACTION_P2P_DECLINED,
19
+        ACTION_P2P_ESTABLISHED,
20
+        ACTION_P2P_FAILED,
21
+        ACTION_P2P_SWITCH_TO_JVB,
22
+        AVAILABLE_DEVICE,
23
+        CONNECTION_DISCONNECTED,
24
+        FEEDBACK,
25
+        ICE_DURATION,
26
+        ICE_ESTABLISHMENT_DURATION_DIFF,
27
+        ICE_STATE_CHANGED,
28
+        NO_BYTES_SENT,
29
+        TRACK_UNMUTED,
30
+        createBridgeDownEvent,
31
+        createConnectionFailedEvent,
32
+        createConferenceEvent,
33
+        createConnectionStageReachedEvent,
34
+        createE2eRttEvent,
35
+        createFocusLeftEvent,
36
+        createGetUserMediaEvent,
37
+        createParticipantConnectionStatusEvent,
38
+        createJingleEvent,
39
+        createNoDataFromSourceEvent,
40
+        createP2PEvent,
41
+        createRemotelyMutedEvent,
42
+        createRtpStatsEvent,
43
+        createRttByRegionEvent,
44
+        createTransportStatsEvent,
45
+        createAudioOutputProblemEvent,
46
+        createBridgeChannelClosedEvent,
47
+        createTtfmEvent,
48
+        /*AnalyticsEvents,*/
49
+        ...others
50
+    } = exported as any; // TODO: remove cast after typescript conversion
51
+
52
+    it( "known members", () => {
53
+        expect( TYPE_OPERATIONAL ).toBe( 'operational' );
54
+        expect( TYPE_PAGE ).toBe( 'page' );
55
+        expect( TYPE_TRACK ).toBe( 'track' );
56
+        expect( TYPE_UI ).toBe( 'ui' );
57
+        expect( ACTION_JINGLE_RESTART ).toBe( 'restart' );
58
+        expect( ACTION_JINGLE_SA_TIMEOUT ).toBe( 'session-accept.timeout' );
59
+        expect( ACTION_JINGLE_SI_RECEIVED ).toBe( 'session-initiate.received' );
60
+        expect( ACTION_JINGLE_SI_TIMEOUT ).toBe( 'session-initiate.timeout' );
61
+        expect( ACTION_JINGLE_TERMINATE ).toBe( 'terminate' );
62
+        expect( ACTION_JINGLE_TR_RECEIVED ).toBe( 'transport-replace.received' );
63
+        expect( ACTION_JINGLE_TR_SUCCESS ).toBe( 'transport-replace.success' );
64
+        expect( ACTION_P2P_DECLINED ).toBe( 'decline' );
65
+        expect( ACTION_P2P_ESTABLISHED ).toBe( 'established' );
66
+        expect( ACTION_P2P_FAILED ).toBe( 'failed' );
67
+        expect( ACTION_P2P_SWITCH_TO_JVB ).toBe( 'switch.to.jvb' );
68
+        expect( AVAILABLE_DEVICE ).toBe( 'available.device' );
69
+        expect( CONNECTION_DISCONNECTED ).toBe( 'connection.disconnected' );
70
+        expect( FEEDBACK ).toBe( 'feedback' );
71
+        expect( ICE_DURATION ).toBe( 'ice.duration' );
72
+        expect( ICE_ESTABLISHMENT_DURATION_DIFF ).toBe( 'ice.establishment.duration.diff' );
73
+        expect( ICE_STATE_CHANGED ).toBe( 'ice.state.changed' );
74
+        expect( NO_BYTES_SENT ).toBe( 'track.no-bytes-sent' );
75
+        expect( TRACK_UNMUTED ).toBe( 'track.unmuted' );
76
+        expect( typeof ( createBridgeDownEvent ) ).toBe( 'function' );
77
+        expect( typeof ( createConnectionFailedEvent ) ).toBe( 'function' );
78
+        expect( typeof ( createConferenceEvent ) ).toBe( 'function' );
79
+        expect( typeof ( createConnectionStageReachedEvent ) ).toBe( 'function' );
80
+        expect( typeof ( createE2eRttEvent ) ).toBe( 'function' );
81
+        expect( typeof ( createFocusLeftEvent ) ).toBe( 'function' );
82
+        expect( typeof ( createGetUserMediaEvent ) ).toBe( 'function' );
83
+        expect( typeof ( createParticipantConnectionStatusEvent ) ).toBe( 'function' );
84
+        expect( typeof ( createJingleEvent ) ).toBe( 'function' );
85
+        expect( typeof ( createNoDataFromSourceEvent ) ).toBe( 'function' );
86
+        expect( typeof ( createP2PEvent ) ).toBe( 'function' );
87
+        expect( typeof ( createRemotelyMutedEvent ) ).toBe( 'function' );
88
+        expect( typeof ( createRtpStatsEvent ) ).toBe( 'function' );
89
+        expect( typeof ( createRttByRegionEvent ) ).toBe( 'function' );
90
+        expect( typeof ( createTransportStatsEvent ) ).toBe( 'function' );
91
+        expect( typeof ( createAudioOutputProblemEvent ) ).toBe( 'function' );
92
+        expect( typeof ( createBridgeChannelClosedEvent ) ).toBe( 'function' );
93
+        expect( typeof ( createTtfmEvent ) ).toBe( 'function' );
94
+    } );
95
+
96
+    it( "unknown members", () => {
97
+        const keys = Object.keys( others );
98
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
99
+    } );
100
+} );

+ 35
- 0
service/statistics/Events.spec.ts View File

@@ -0,0 +1,35 @@
1
+import * as exported from "./Events";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/statistics/Events members", () => {
6
+    const {
7
+        AUDIO_LEVEL,
8
+        BEFORE_DISPOSED,
9
+        BYTE_SENT_STATS,
10
+        CONNECTION_STATS,
11
+        LONG_TASKS_STATS,
12
+        Events,
13
+        ...others
14
+    } = exported as any; // TODO: remove cast after typescript conversion
15
+
16
+    it( "known members", () => {
17
+        expect( AUDIO_LEVEL ).toBe( 'statistics.audioLevel' );
18
+        expect( BEFORE_DISPOSED ).toBe( 'statistics.before_disposed' );
19
+        expect( BYTE_SENT_STATS ).toBe( 'statistics.byte_sent_stats' );
20
+        expect( CONNECTION_STATS ).toBe( 'statistics.connectionstats' );
21
+        expect( LONG_TASKS_STATS ).toBe( 'statistics.long_tasks_stats' );
22
+        if ( Events ) {
23
+            expect( Events.AUDIO_LEVEL ).toBe( 'statistics.audioLevel' );
24
+            expect( Events.BEFORE_DISPOSED ).toBe( 'statistics.before_disposed' );
25
+            expect( Events.BYTE_SENT_STATS ).toBe( 'statistics.byte_sent_stats' );
26
+            expect( Events.CONNECTION_STATS ).toBe( 'statistics.connectionstats' );
27
+            expect( Events.LONG_TASKS_STATS ).toBe( 'statistics.long_tasks_stats' );
28
+        }
29
+    } );
30
+
31
+    it( "unknown members", () => {
32
+        const keys = Object.keys( others );
33
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
34
+    } );
35
+} );

+ 23
- 0
service/statistics/constants.spec.ts View File

@@ -0,0 +1,23 @@
1
+import * as exported from "./constants";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/statistics/constants members", () => {
6
+    const {
7
+        LOCAL_JID,
8
+        Constants,
9
+        ...others
10
+    } = exported as any; // TODO: remove cast after typescript conversion
11
+
12
+    it( "known members", () => {
13
+        expect( LOCAL_JID ).toBe( 'local' );
14
+        if ( Constants ) {
15
+            expect( Constants.LOCAL_JID ).toBe( 'local' );
16
+        }
17
+    } );
18
+
19
+    it( "unknown members", () => {
20
+        const keys = Object.keys( others );
21
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
22
+    } );
23
+} );

+ 304
- 0
service/xmpp/XMPPEvents.spec.ts View File

@@ -0,0 +1,304 @@
1
+import * as exported from "./XMPPEvents";
2
+
3
+// this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
4
+
5
+describe( "/service/xmpp/XMPPEvents members", () => {
6
+    const {
7
+        ADD_ICE_CANDIDATE_FAILED,
8
+        AUDIO_MUTED_BY_FOCUS,
9
+        VIDEO_MUTED_BY_FOCUS,
10
+        AUTHENTICATION_REQUIRED,
11
+        BRIDGE_DOWN,
12
+        CALL_ACCEPTED,
13
+        CALL_INCOMING,
14
+        CALL_ENDED,
15
+        CHAT_ERROR_RECEIVED,
16
+        SETTINGS_ERROR_RECEIVED,
17
+        CONFERENCE_PROPERTIES_CHANGED,
18
+        CONNECTION_ESTABLISHED,
19
+        CONNECTION_FAILED,
20
+        CONNECTION_INTERRUPTED,
21
+        CONNECTION_RESTORED,
22
+        CONNECTION_ICE_FAILED,
23
+        CONNECTION_RESTARTED,
24
+        CONNECTION_STATUS_CHANGED,
25
+        DISPLAY_NAME_CHANGED,
26
+        EMUC_ROOM_ADDED,
27
+        EMUC_ROOM_REMOVED,
28
+        ETHERPAD,
29
+        FOCUS_DISCONNECTED,
30
+        FOCUS_LEFT,
31
+        GRACEFUL_SHUTDOWN,
32
+        ICE_RESTARTING,
33
+        ICE_RESTART_SUCCESS,
34
+        KICKED,
35
+        LOCAL_ROLE_CHANGED,
36
+        MEETING_ID_SET,
37
+        MESSAGE_RECEIVED,
38
+        INVITE_MESSAGE_RECEIVED,
39
+        PRIVATE_MESSAGE_RECEIVED,
40
+        MUC_MEMBER_BOT_TYPE_CHANGED,
41
+        MUC_DESTROYED,
42
+        MUC_JOIN_IN_PROGRESS,
43
+        MUC_JOINED,
44
+        MUC_MEMBER_JOINED,
45
+        MUC_MEMBER_LEFT,
46
+        MUC_LOBBY_MEMBER_JOINED,
47
+        MUC_LOBBY_MEMBER_UPDATED,
48
+        MUC_LOBBY_MEMBER_LEFT,
49
+        MUC_DENIED_ACCESS,
50
+        MUC_LEFT,
51
+        MUC_ROLE_CHANGED,
52
+        MUC_LOCK_CHANGED,
53
+        MUC_MEMBERS_ONLY_CHANGED,
54
+        PARTICIPANT_AUDIO_MUTED,
55
+        PARTICIPANT_VIDEO_MUTED,
56
+        PARTICIPANT_VIDEO_TYPE_CHANGED,
57
+        PARTICIPANT_FEATURES_CHANGED,
58
+        PASSWORD_REQUIRED,
59
+        PHONE_NUMBER_CHANGED,
60
+        PRESENCE_RECEIVED,
61
+        PRESENCE_STATUS,
62
+        PROMPT_FOR_LOGIN,
63
+        READY_TO_JOIN,
64
+        RECORDER_STATE_CHANGED,
65
+        REMOTE_STATS,
66
+        RENEGOTIATION_FAILED,
67
+        RESERVATION_ERROR,
68
+        ROOM_CONNECT_ERROR,
69
+        ROOM_CONNECT_NOT_ALLOWED_ERROR,
70
+        ROOM_JOIN_ERROR,
71
+        ROOM_CONNECT_MEMBERS_ONLY_ERROR,
72
+        ROOM_MAX_USERS_ERROR,
73
+        SENDING_CHAT_MESSAGE,
74
+        SENDING_PRIVATE_CHAT_MESSAGE,
75
+        SESSION_ACCEPT,
76
+        SESSION_ACCEPT_ERROR,
77
+        SESSION_ACCEPT_TIMEOUT,
78
+        SOURCE_ADD,
79
+        SOURCE_ADD_ERROR,
80
+        SOURCE_REMOVE,
81
+        SOURCE_REMOVE_ERROR,
82
+        SPEAKER_STATS_RECEIVED,
83
+        CONFERENCE_TIMESTAMP_RECEIVED,
84
+        AV_MODERATION_APPROVED,
85
+        AV_MODERATION_REJECTED,
86
+        AV_MODERATION_RECEIVED,
87
+        AV_MODERATION_CHANGED,
88
+        AV_MODERATION_PARTICIPANT_APPROVED,
89
+        AV_MODERATION_PARTICIPANT_REJECTED,
90
+        BREAKOUT_ROOMS_MOVE_TO_ROOM,
91
+        BREAKOUT_ROOMS_EVENT,
92
+        BREAKOUT_ROOMS_UPDATED,
93
+        START_MUTED_FROM_FOCUS,
94
+        SUBJECT_CHANGED,
95
+        SUSPEND_DETECTED,
96
+        TRANSCRIPTION_STATUS_CHANGED,
97
+        TRANSPORT_INFO,
98
+        VIDEO_SIP_GW_AVAILABILITY_CHANGED,
99
+        VIDEO_SIP_GW_SESSION_STATE_CHANGED,
100
+        ICE_CONNECTION_STATE_CHANGED,
101
+        JSON_MESSAGE_RECEIVED,
102
+        XMPPEvents,
103
+        ...others
104
+    } = exported as any; // TODO: remove cast after typescript conversion
105
+    it( "known members", () => {
106
+        expect( ADD_ICE_CANDIDATE_FAILED ).toBe( 'xmpp.add_ice_candidate_failed' );
107
+        expect( AUDIO_MUTED_BY_FOCUS ).toBe( 'xmpp.audio_muted_by_focus' );
108
+        expect( VIDEO_MUTED_BY_FOCUS ).toBe( 'xmpp.video_muted_by_focus' );
109
+        expect( AUTHENTICATION_REQUIRED ).toBe( 'xmpp.authentication_required' );
110
+        expect( BRIDGE_DOWN ).toBe( 'xmpp.bridge_down' );
111
+        expect( CALL_ACCEPTED ).toBe( 'xmpp.callaccepted.jingle' );
112
+        expect( CALL_INCOMING ).toBe( 'xmpp.callincoming.jingle' );
113
+        expect( CALL_ENDED ).toBe( 'xmpp.callended.jingle' );
114
+        expect( CHAT_ERROR_RECEIVED ).toBe( 'xmpp.chat_error_received' );
115
+        expect( SETTINGS_ERROR_RECEIVED ).toBe( 'xmpp.settings_error_received' );
116
+        expect( CONFERENCE_PROPERTIES_CHANGED ).toBe( 'xmpp.conference_properties_changed' );
117
+        expect( CONNECTION_ESTABLISHED ).toBe( 'xmpp.connection.connected' );
118
+        expect( CONNECTION_FAILED ).toBe( 'xmpp.connection.failed' );
119
+        expect( CONNECTION_INTERRUPTED ).toBe( 'xmpp.connection.interrupted' );
120
+        expect( CONNECTION_RESTORED ).toBe( 'xmpp.connection.restored' );
121
+        expect( CONNECTION_ICE_FAILED ).toBe( 'xmpp.connection.ice.failed' );
122
+        expect( CONNECTION_RESTARTED ).toBe( 'xmpp.connection.restart' );
123
+        expect( CONNECTION_STATUS_CHANGED ).toBe( 'xmpp.connection.status.changed' );
124
+        expect( DISPLAY_NAME_CHANGED ).toBe( 'xmpp.display_name_changed' );
125
+        expect( EMUC_ROOM_ADDED ).toBe( 'xmpp.emuc_room_added' );
126
+        expect( EMUC_ROOM_REMOVED ).toBe( 'xmpp.emuc_room_removed' );
127
+        expect( ETHERPAD ).toBe( 'xmpp.etherpad' );
128
+        expect( FOCUS_DISCONNECTED ).toBe( 'xmpp.focus_disconnected' );
129
+        expect( FOCUS_LEFT ).toBe( 'xmpp.focus_left' );
130
+        expect( GRACEFUL_SHUTDOWN ).toBe( 'xmpp.graceful_shutdown' );
131
+        expect( ICE_RESTARTING ).toBe( 'rtc.ice_restarting' );
132
+        expect( ICE_RESTART_SUCCESS ).toBe( 'rtc.ice_restart_success' );
133
+        expect( KICKED ).toBe( 'xmpp.kicked' );
134
+        expect( LOCAL_ROLE_CHANGED ).toBe( 'xmpp.localrole_changed' );
135
+        expect( MEETING_ID_SET ).toBe( 'xmpp.meeting_id_set' );
136
+        expect( MESSAGE_RECEIVED ).toBe( 'xmpp.message_received' );
137
+        expect( INVITE_MESSAGE_RECEIVED ).toBe( 'xmpp.invite_message_received' );
138
+        expect( PRIVATE_MESSAGE_RECEIVED ).toBe( 'xmpp.private_message_received' );
139
+        expect( MUC_MEMBER_BOT_TYPE_CHANGED ).toBe( 'xmpp.muc_member_bot_type_changed' );
140
+        expect( MUC_DESTROYED ).toBe( 'xmpp.muc_destroyed' );
141
+        expect( MUC_JOIN_IN_PROGRESS ).toBe( 'xmpp.muc_join_in_progress' );
142
+        expect( MUC_JOINED ).toBe( 'xmpp.muc_joined' );
143
+        expect( MUC_MEMBER_JOINED ).toBe( 'xmpp.muc_member_joined' );
144
+        expect( MUC_MEMBER_LEFT ).toBe( 'xmpp.muc_member_left' );
145
+        expect( MUC_LOBBY_MEMBER_JOINED ).toBe( 'xmpp.muc_lobby_member_joined' );
146
+        expect( MUC_LOBBY_MEMBER_UPDATED ).toBe( 'xmpp.muc_lobby_member_updated' );
147
+        expect( MUC_LOBBY_MEMBER_LEFT ).toBe( 'xmpp.muc_lobby_member_left' );
148
+        expect( MUC_DENIED_ACCESS ).toBe( 'xmpp.muc_denied access' );
149
+        expect( MUC_LEFT ).toBe( 'xmpp.muc_left' );
150
+        expect( MUC_ROLE_CHANGED ).toBe( 'xmpp.muc_role_changed' );
151
+        expect( MUC_LOCK_CHANGED ).toBe( 'xmpp.muc_lock_changed' );
152
+        expect( MUC_MEMBERS_ONLY_CHANGED ).toBe( 'xmpp.muc_members_only_changed' );
153
+        expect( PARTICIPANT_AUDIO_MUTED ).toBe( 'xmpp.audio_muted' );
154
+        expect( PARTICIPANT_VIDEO_MUTED ).toBe( 'xmpp.video_muted' );
155
+        expect( PARTICIPANT_VIDEO_TYPE_CHANGED ).toBe( 'xmpp.video_type' );
156
+        expect( PARTICIPANT_FEATURES_CHANGED ).toBe( 'xmpp.participant_features_changed' );
157
+        expect( PASSWORD_REQUIRED ).toBe( 'xmpp.password_required' );
158
+        expect( PHONE_NUMBER_CHANGED ).toBe( 'conference.phoneNumberChanged' );
159
+        expect( PRESENCE_RECEIVED ).toBe( 'xmpp.presence_received' );
160
+        expect( PRESENCE_STATUS ).toBe( 'xmpp.presence_status' );
161
+        expect( PROMPT_FOR_LOGIN ).toBe( 'xmpp.prompt_for_login' );
162
+        expect( READY_TO_JOIN ).toBe( 'xmpp.ready_to_join' );
163
+        expect( RECORDER_STATE_CHANGED ).toBe( 'xmpp.recorderStateChanged' );
164
+        expect( REMOTE_STATS ).toBe( 'xmpp.remote_stats' );
165
+        expect( RENEGOTIATION_FAILED ).toBe( 'xmpp.renegotiation_failed' );
166
+        expect( RESERVATION_ERROR ).toBe( 'xmpp.room_reservation_error' );
167
+        expect( ROOM_CONNECT_ERROR ).toBe( 'xmpp.room_connect_error' );
168
+        expect( ROOM_CONNECT_NOT_ALLOWED_ERROR ).toBe( 'xmpp.room_connect_error.not_allowed' );
169
+        expect( ROOM_JOIN_ERROR ).toBe( 'xmpp.room_join_error' );
170
+        expect( ROOM_CONNECT_MEMBERS_ONLY_ERROR ).toBe( 'xmpp.room_connect_error.members_only' );
171
+        expect( ROOM_MAX_USERS_ERROR ).toBe( 'xmpp.room_max_users_error' );
172
+        expect( SENDING_CHAT_MESSAGE ).toBe( 'xmpp.sending_chat_message' );
173
+        expect( SENDING_PRIVATE_CHAT_MESSAGE ).toBe( 'xmpp.sending_private_chat_message' );
174
+        expect( SESSION_ACCEPT ).toBe( 'xmpp.session_accept' );
175
+        expect( SESSION_ACCEPT_ERROR ).toBe( 'xmpp.session_accept_error' );
176
+        expect( SESSION_ACCEPT_TIMEOUT ).toBe( 'xmpp.session_accept_timeout' );
177
+        expect( SOURCE_ADD ).toBe( 'xmpp.source_add' );
178
+        expect( SOURCE_ADD_ERROR ).toBe( 'xmpp.source_add_error' );
179
+        expect( SOURCE_REMOVE ).toBe( 'xmpp.source_remove' );
180
+        expect( SOURCE_REMOVE_ERROR ).toBe( 'xmpp.source_remove_error' );
181
+        expect( SPEAKER_STATS_RECEIVED ).toBe( 'xmpp.speaker_stats_received' );
182
+        expect( CONFERENCE_TIMESTAMP_RECEIVED ).toBe( 'xmpp.conference_timestamp_received' );
183
+        expect( AV_MODERATION_APPROVED ).toBe( 'xmpp.av_moderation.approved' );
184
+        expect( AV_MODERATION_REJECTED ).toBe( 'xmpp.av_moderation.rejected' );
185
+        expect( AV_MODERATION_RECEIVED ).toBe( 'xmpp.av_moderation.received' );
186
+        expect( AV_MODERATION_CHANGED ).toBe( 'xmpp.av_moderation.changed' );
187
+        expect( AV_MODERATION_PARTICIPANT_APPROVED ).toBe( 'xmpp.av_moderation.participant.approved' );
188
+        expect( AV_MODERATION_PARTICIPANT_REJECTED ).toBe( 'xmpp.av_moderation.participant.rejected' );
189
+        expect( BREAKOUT_ROOMS_MOVE_TO_ROOM ).toBe( 'xmpp.breakout-rooms.move-to-room' );
190
+        expect( BREAKOUT_ROOMS_EVENT ).toBe( 'xmpp.breakout-rooms.event' );
191
+        expect( BREAKOUT_ROOMS_UPDATED ).toBe( 'xmpp.breakout-rooms.updated' );
192
+        expect( START_MUTED_FROM_FOCUS ).toBe( 'xmpp.start_muted_from_focus' );
193
+        expect( SUBJECT_CHANGED ).toBe( 'xmpp.subject_changed' );
194
+        expect( SUSPEND_DETECTED ).toBe( 'xmpp.suspend_detected' );
195
+        expect( TRANSCRIPTION_STATUS_CHANGED ).toBe( 'xmpp.transcription_status_changed' );
196
+        expect( TRANSPORT_INFO ).toBe( 'xmpp.transportinfo.jingle' );
197
+        expect( VIDEO_SIP_GW_AVAILABILITY_CHANGED ).toBe( 'xmpp.videoSIPGWAvailabilityChanged' );
198
+        expect( VIDEO_SIP_GW_SESSION_STATE_CHANGED ).toBe( 'xmpp.videoSIPGWSessionStateChanged' );
199
+        expect( ICE_CONNECTION_STATE_CHANGED ).toBe( 'xmpp.ice_connection_state_changed' );
200
+        expect( JSON_MESSAGE_RECEIVED ).toBe( 'xmmp.json_message_received' );
201
+        if ( XMPPEvents ) {
202
+            expect( XMPPEvents.ADD_ICE_CANDIDATE_FAILED ).toBe( 'xmpp.add_ice_candidate_failed' );
203
+            expect( XMPPEvents.AUDIO_MUTED_BY_FOCUS ).toBe( 'xmpp.audio_muted_by_focus' );
204
+            expect( XMPPEvents.VIDEO_MUTED_BY_FOCUS ).toBe( 'xmpp.video_muted_by_focus' );
205
+            expect( XMPPEvents.AUTHENTICATION_REQUIRED ).toBe( 'xmpp.authentication_required' );
206
+            expect( XMPPEvents.BRIDGE_DOWN ).toBe( 'xmpp.bridge_down' );
207
+            expect( XMPPEvents.CALL_ACCEPTED ).toBe( 'xmpp.callaccepted.jingle' );
208
+            expect( XMPPEvents.CALL_INCOMING ).toBe( 'xmpp.callincoming.jingle' );
209
+            expect( XMPPEvents.CALL_ENDED ).toBe( 'xmpp.callended.jingle' );
210
+            expect( XMPPEvents.CHAT_ERROR_RECEIVED ).toBe( 'xmpp.chat_error_received' );
211
+            expect( XMPPEvents.SETTINGS_ERROR_RECEIVED ).toBe( 'xmpp.settings_error_received' );
212
+            expect( XMPPEvents.CONFERENCE_PROPERTIES_CHANGED ).toBe( 'xmpp.conference_properties_changed' );
213
+            expect( XMPPEvents.CONNECTION_ESTABLISHED ).toBe( 'xmpp.connection.connected' );
214
+            expect( XMPPEvents.CONNECTION_FAILED ).toBe( 'xmpp.connection.failed' );
215
+            expect( XMPPEvents.CONNECTION_INTERRUPTED ).toBe( 'xmpp.connection.interrupted' );
216
+            expect( XMPPEvents.CONNECTION_RESTORED ).toBe( 'xmpp.connection.restored' );
217
+            expect( XMPPEvents.CONNECTION_ICE_FAILED ).toBe( 'xmpp.connection.ice.failed' );
218
+            expect( XMPPEvents.CONNECTION_RESTARTED ).toBe( 'xmpp.connection.restart' );
219
+            expect( XMPPEvents.CONNECTION_STATUS_CHANGED ).toBe( 'xmpp.connection.status.changed' );
220
+            expect( XMPPEvents.DISPLAY_NAME_CHANGED ).toBe( 'xmpp.display_name_changed' );
221
+            expect( XMPPEvents.EMUC_ROOM_ADDED ).toBe( 'xmpp.emuc_room_added' );
222
+            expect( XMPPEvents.EMUC_ROOM_REMOVED ).toBe( 'xmpp.emuc_room_removed' );
223
+            expect( XMPPEvents.ETHERPAD ).toBe( 'xmpp.etherpad' );
224
+            expect( XMPPEvents.FOCUS_DISCONNECTED ).toBe( 'xmpp.focus_disconnected' );
225
+            expect( XMPPEvents.FOCUS_LEFT ).toBe( 'xmpp.focus_left' );
226
+            expect( XMPPEvents.GRACEFUL_SHUTDOWN ).toBe( 'xmpp.graceful_shutdown' );
227
+            expect( XMPPEvents.ICE_RESTARTING ).toBe( 'rtc.ice_restarting' );
228
+            expect( XMPPEvents.ICE_RESTART_SUCCESS ).toBe( 'rtc.ice_restart_success' );
229
+            expect( XMPPEvents.KICKED ).toBe( 'xmpp.kicked' );
230
+            expect( XMPPEvents.LOCAL_ROLE_CHANGED ).toBe( 'xmpp.localrole_changed' );
231
+            expect( XMPPEvents.MEETING_ID_SET ).toBe( 'xmpp.meeting_id_set' );
232
+            expect( XMPPEvents.MESSAGE_RECEIVED ).toBe( 'xmpp.message_received' );
233
+            expect( XMPPEvents.INVITE_MESSAGE_RECEIVED ).toBe( 'xmpp.invite_message_received' );
234
+            expect( XMPPEvents.PRIVATE_MESSAGE_RECEIVED ).toBe( 'xmpp.private_message_received' );
235
+            expect( XMPPEvents.MUC_MEMBER_BOT_TYPE_CHANGED ).toBe( 'xmpp.muc_member_bot_type_changed' );
236
+            expect( XMPPEvents.MUC_DESTROYED ).toBe( 'xmpp.muc_destroyed' );
237
+            expect( XMPPEvents.MUC_JOIN_IN_PROGRESS ).toBe( 'xmpp.muc_join_in_progress' );
238
+            expect( XMPPEvents.MUC_JOINED ).toBe( 'xmpp.muc_joined' );
239
+            expect( XMPPEvents.MUC_MEMBER_JOINED ).toBe( 'xmpp.muc_member_joined' );
240
+            expect( XMPPEvents.MUC_MEMBER_LEFT ).toBe( 'xmpp.muc_member_left' );
241
+            expect( XMPPEvents.MUC_LOBBY_MEMBER_JOINED ).toBe( 'xmpp.muc_lobby_member_joined' );
242
+            expect( XMPPEvents.MUC_LOBBY_MEMBER_UPDATED ).toBe( 'xmpp.muc_lobby_member_updated' );
243
+            expect( XMPPEvents.MUC_LOBBY_MEMBER_LEFT ).toBe( 'xmpp.muc_lobby_member_left' );
244
+            expect( XMPPEvents.MUC_DENIED_ACCESS ).toBe( 'xmpp.muc_denied access' );
245
+            expect( XMPPEvents.MUC_LEFT ).toBe( 'xmpp.muc_left' );
246
+            expect( XMPPEvents.MUC_ROLE_CHANGED ).toBe( 'xmpp.muc_role_changed' );
247
+            expect( XMPPEvents.MUC_LOCK_CHANGED ).toBe( 'xmpp.muc_lock_changed' );
248
+            expect( XMPPEvents.MUC_MEMBERS_ONLY_CHANGED ).toBe( 'xmpp.muc_members_only_changed' );
249
+            expect( XMPPEvents.PARTICIPANT_AUDIO_MUTED ).toBe( 'xmpp.audio_muted' );
250
+            expect( XMPPEvents.PARTICIPANT_VIDEO_MUTED ).toBe( 'xmpp.video_muted' );
251
+            expect( XMPPEvents.PARTICIPANT_VIDEO_TYPE_CHANGED ).toBe( 'xmpp.video_type' );
252
+            expect( XMPPEvents.PARTICIPANT_FEATURES_CHANGED ).toBe( 'xmpp.participant_features_changed' );
253
+            expect( XMPPEvents.PASSWORD_REQUIRED ).toBe( 'xmpp.password_required' );
254
+            expect( XMPPEvents.PHONE_NUMBER_CHANGED ).toBe( 'conference.phoneNumberChanged' );
255
+            expect( XMPPEvents.PRESENCE_RECEIVED ).toBe( 'xmpp.presence_received' );
256
+            expect( XMPPEvents.PRESENCE_STATUS ).toBe( 'xmpp.presence_status' );
257
+            expect( XMPPEvents.PROMPT_FOR_LOGIN ).toBe( 'xmpp.prompt_for_login' );
258
+            expect( XMPPEvents.READY_TO_JOIN ).toBe( 'xmpp.ready_to_join' );
259
+            expect( XMPPEvents.RECORDER_STATE_CHANGED ).toBe( 'xmpp.recorderStateChanged' );
260
+            expect( XMPPEvents.REMOTE_STATS ).toBe( 'xmpp.remote_stats' );
261
+            expect( XMPPEvents.RENEGOTIATION_FAILED ).toBe( 'xmpp.renegotiation_failed' );
262
+            expect( XMPPEvents.RESERVATION_ERROR ).toBe( 'xmpp.room_reservation_error' );
263
+            expect( XMPPEvents.ROOM_CONNECT_ERROR ).toBe( 'xmpp.room_connect_error' );
264
+            expect( XMPPEvents.ROOM_CONNECT_NOT_ALLOWED_ERROR ).toBe( 'xmpp.room_connect_error.not_allowed' );
265
+            expect( XMPPEvents.ROOM_JOIN_ERROR ).toBe( 'xmpp.room_join_error' );
266
+            expect( XMPPEvents.ROOM_CONNECT_MEMBERS_ONLY_ERROR ).toBe( 'xmpp.room_connect_error.members_only' );
267
+            expect( XMPPEvents.ROOM_MAX_USERS_ERROR ).toBe( 'xmpp.room_max_users_error' );
268
+            expect( XMPPEvents.SENDING_CHAT_MESSAGE ).toBe( 'xmpp.sending_chat_message' );
269
+            expect( XMPPEvents.SENDING_PRIVATE_CHAT_MESSAGE ).toBe( 'xmpp.sending_private_chat_message' );
270
+            expect( XMPPEvents.SESSION_ACCEPT ).toBe( 'xmpp.session_accept' );
271
+            expect( XMPPEvents.SESSION_ACCEPT_ERROR ).toBe( 'xmpp.session_accept_error' );
272
+            expect( XMPPEvents.SESSION_ACCEPT_TIMEOUT ).toBe( 'xmpp.session_accept_timeout' );
273
+            expect( XMPPEvents.SOURCE_ADD ).toBe( 'xmpp.source_add' );
274
+            expect( XMPPEvents.SOURCE_ADD_ERROR ).toBe( 'xmpp.source_add_error' );
275
+            expect( XMPPEvents.SOURCE_REMOVE ).toBe( 'xmpp.source_remove' );
276
+            expect( XMPPEvents.SOURCE_REMOVE_ERROR ).toBe( 'xmpp.source_remove_error' );
277
+            expect( XMPPEvents.SPEAKER_STATS_RECEIVED ).toBe( 'xmpp.speaker_stats_received' );
278
+            expect( XMPPEvents.CONFERENCE_TIMESTAMP_RECEIVED ).toBe( 'xmpp.conference_timestamp_received' );
279
+            expect( XMPPEvents.AV_MODERATION_APPROVED ).toBe( 'xmpp.av_moderation.approved' );
280
+            expect( XMPPEvents.AV_MODERATION_REJECTED ).toBe( 'xmpp.av_moderation.rejected' );
281
+            expect( XMPPEvents.AV_MODERATION_RECEIVED ).toBe( 'xmpp.av_moderation.received' );
282
+            expect( XMPPEvents.AV_MODERATION_CHANGED ).toBe( 'xmpp.av_moderation.changed' );
283
+            expect( XMPPEvents.AV_MODERATION_PARTICIPANT_APPROVED ).toBe( 'xmpp.av_moderation.participant.approved' );
284
+            expect( XMPPEvents.AV_MODERATION_PARTICIPANT_REJECTED ).toBe( 'xmpp.av_moderation.participant.rejected' );
285
+            expect( XMPPEvents.BREAKOUT_ROOMS_MOVE_TO_ROOM ).toBe( 'xmpp.breakout-rooms.move-to-room' );
286
+            expect( XMPPEvents.BREAKOUT_ROOMS_EVENT ).toBe( 'xmpp.breakout-rooms.event' );
287
+            expect( XMPPEvents.BREAKOUT_ROOMS_UPDATED ).toBe( 'xmpp.breakout-rooms.updated' );
288
+            expect( XMPPEvents.START_MUTED_FROM_FOCUS ).toBe( 'xmpp.start_muted_from_focus' );
289
+            expect( XMPPEvents.SUBJECT_CHANGED ).toBe( 'xmpp.subject_changed' );
290
+            expect( XMPPEvents.SUSPEND_DETECTED ).toBe( 'xmpp.suspend_detected' );
291
+            expect( XMPPEvents.TRANSCRIPTION_STATUS_CHANGED ).toBe( 'xmpp.transcription_status_changed' );
292
+            expect( XMPPEvents.TRANSPORT_INFO ).toBe( 'xmpp.transportinfo.jingle' );
293
+            expect( XMPPEvents.VIDEO_SIP_GW_AVAILABILITY_CHANGED ).toBe( 'xmpp.videoSIPGWAvailabilityChanged' );
294
+            expect( XMPPEvents.VIDEO_SIP_GW_SESSION_STATE_CHANGED ).toBe( 'xmpp.videoSIPGWSessionStateChanged' );
295
+            expect( XMPPEvents.ICE_CONNECTION_STATE_CHANGED ).toBe( 'xmpp.ice_connection_state_changed' );
296
+            expect( XMPPEvents.JSON_MESSAGE_RECEIVED ).toBe( 'xmmp.json_message_received' );
297
+        }
298
+    } );
299
+
300
+    it( "unknown members", () => {
301
+        const keys = Object.keys( others );
302
+        expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
303
+    } );
304
+} );

+ 1
- 0
tsconfig.json View File

@@ -20,6 +20,7 @@
20 20
     "doc",
21 21
     "dist",
22 22
     "**/*.spec.js",
23
+    "**/*.spec.ts",
23 24
     "*.conf*.js",
24 25
     "webpack*.js",
25 26
     "lib-jitsi-meet.*.js",

+ 69
- 55
types/auto/JitsiTrackErrors.d.ts View File

@@ -1,58 +1,72 @@
1 1
 /**
2 2
  * The errors for the JitsiTrack objects.
3 3
  */
4
-/**
5
- * An error which indicates that some of requested constraints in
6
- * getUserMedia call were not satisfied.
7
- */
8
-export const CONSTRAINT_FAILED: "gum.constraint_failed";
9
-/**
10
- * A generic error which indicates an error occurred while selecting
11
- * a DesktopCapturerSource from the electron app.
12
- */
13
-export const ELECTRON_DESKTOP_PICKER_ERROR: "gum.electron_desktop_picker_error";
14
-/**
15
- * An error which indicates a custom desktop picker could not be detected
16
- * for the electron app.
17
- */
18
-export const ELECTRON_DESKTOP_PICKER_NOT_FOUND: "gum.electron_desktop_picker_not_found";
19
-/**
20
- * Generic getUserMedia error.
21
- */
22
-export const GENERAL: "gum.general";
23
-/**
24
- * An error which indicates that requested device was not found.
25
- */
26
-export const NOT_FOUND: "gum.not_found";
27
-/**
28
- * An error which indicates that user denied permission to share requested
29
- * device.
30
- */
31
-export const PERMISSION_DENIED: "gum.permission_denied";
32
-/**
33
- * Generic error for screensharing failure.
34
- */
35
-export const SCREENSHARING_GENERIC_ERROR: "gum.screensharing_generic_error";
36
-/**
37
- * An error which indicates that user canceled screen sharing window
38
- * selection dialog.
39
- */
40
-export const SCREENSHARING_USER_CANCELED: "gum.screensharing_user_canceled";
41
-/**
42
- * Indicates that the timeout passed to the obtainAudioAndVideoPermissions has expired without GUM resolving.
43
- */
44
-export const TIMEOUT: "gum.timeout";
45
-/**
46
- * An error which indicates that track has been already disposed and cannot
47
- * be longer used.
48
- */
49
-export const TRACK_IS_DISPOSED: "track.track_is_disposed";
50
-/**
51
- * An error which indicates that track has no MediaStream associated.
52
- */
53
-export const TRACK_NO_STREAM_FOUND: "track.no_stream_found";
54
-/**
55
- * An error which indicates that requested video resolution is not supported
56
- * by a webcam.
57
- */
58
-export const UNSUPPORTED_RESOLUTION: "gum.unsupported_resolution";
4
+export declare enum JitsiTrackErrors {
5
+    /**
6
+     * An error which indicates that some of requested constraints in
7
+     * getUserMedia call were not satisfied.
8
+     */
9
+    CONSTRAINT_FAILED = "gum.constraint_failed",
10
+    /**
11
+     * A generic error which indicates an error occurred while selecting
12
+     * a DesktopCapturerSource from the electron app.
13
+     */
14
+    ELECTRON_DESKTOP_PICKER_ERROR = "gum.electron_desktop_picker_error",
15
+    /**
16
+     * An error which indicates a custom desktop picker could not be detected
17
+     * for the electron app.
18
+     */
19
+    ELECTRON_DESKTOP_PICKER_NOT_FOUND = "gum.electron_desktop_picker_not_found",
20
+    /**
21
+     * Generic getUserMedia error.
22
+     */
23
+    GENERAL = "gum.general",
24
+    /**
25
+     * An error which indicates that requested device was not found.
26
+     */
27
+    NOT_FOUND = "gum.not_found",
28
+    /**
29
+     * An error which indicates that user denied permission to share requested
30
+     * device.
31
+     */
32
+    PERMISSION_DENIED = "gum.permission_denied",
33
+    /**
34
+     * Generic error for screensharing failure.
35
+     */
36
+    SCREENSHARING_GENERIC_ERROR = "gum.screensharing_generic_error",
37
+    /**
38
+     * An error which indicates that user canceled screen sharing window
39
+     * selection dialog.
40
+     */
41
+    SCREENSHARING_USER_CANCELED = "gum.screensharing_user_canceled",
42
+    /**
43
+     * Indicates that the timeout passed to the obtainAudioAndVideoPermissions has expired without GUM resolving.
44
+     */
45
+    TIMEOUT = "gum.timeout",
46
+    /**
47
+     * An error which indicates that track has been already disposed and cannot
48
+     * be longer used.
49
+     */
50
+    TRACK_IS_DISPOSED = "track.track_is_disposed",
51
+    /**
52
+     * An error which indicates that track has no MediaStream associated.
53
+     */
54
+    TRACK_NO_STREAM_FOUND = "track.no_stream_found",
55
+    /**
56
+     * An error which indicates that requested video resolution is not supported
57
+     * by a webcam.
58
+     */
59
+    UNSUPPORTED_RESOLUTION = "gum.unsupported_resolution"
60
+}
61
+export declare const CONSTRAINT_FAILED = JitsiTrackErrors.CONSTRAINT_FAILED;
62
+export declare const ELECTRON_DESKTOP_PICKER_ERROR = JitsiTrackErrors.ELECTRON_DESKTOP_PICKER_ERROR;
63
+export declare const ELECTRON_DESKTOP_PICKER_NOT_FOUND = JitsiTrackErrors.ELECTRON_DESKTOP_PICKER_NOT_FOUND;
64
+export declare const GENERAL = JitsiTrackErrors.GENERAL;
65
+export declare const NOT_FOUND = JitsiTrackErrors.NOT_FOUND;
66
+export declare const PERMISSION_DENIED = JitsiTrackErrors.PERMISSION_DENIED;
67
+export declare const SCREENSHARING_GENERIC_ERROR = JitsiTrackErrors.SCREENSHARING_GENERIC_ERROR;
68
+export declare const SCREENSHARING_USER_CANCELED = JitsiTrackErrors.SCREENSHARING_USER_CANCELED;
69
+export declare const TIMEOUT = JitsiTrackErrors.TIMEOUT;
70
+export declare const TRACK_IS_DISPOSED = JitsiTrackErrors.TRACK_IS_DISPOSED;
71
+export declare const TRACK_NO_STREAM_FOUND = JitsiTrackErrors.TRACK_NO_STREAM_FOUND;
72
+export declare const UNSUPPORTED_RESOLUTION = JitsiTrackErrors.UNSUPPORTED_RESOLUTION;

Loading…
Cancel
Save