Quellcode durchsuchen

chore(cleanup) remove unused code

tags/v0.0.2
Gary Hunt vor 3 Jahren
Ursprung
Commit
b59db5d575
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden

+ 0
- 14
service/RTC/StreamEventTypes.js Datei anzeigen

@@ -1,14 +0,0 @@
1
-const StreamEventTypes = {
2
-    EVENT_TYPE_LOCAL_CREATED: 'stream.local_created',
3
-
4
-    EVENT_TYPE_LOCAL_CHANGED: 'stream.local_changed',
5
-
6
-    EVENT_TYPE_LOCAL_ENDED: 'stream.local_ended',
7
-
8
-    EVENT_TYPE_REMOTE_CREATED: 'stream.remote_created',
9
-
10
-    EVENT_TYPE_REMOTE_ENDED: 'stream.remote_ended',
11
-    TRACK_MUTE_CHANGED: 'rtc.track_mute_changed'
12
-};
13
-
14
-module.exports = StreamEventTypes;

+ 0
- 38
service/RTC/StreamEventTypes.spec.ts Datei anzeigen

@@ -1,38 +0,0 @@
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
-} );

+ 0
- 6
types/auto/service/RTC/StreamEventTypes.d.ts Datei anzeigen

@@ -1,6 +0,0 @@
1
-export const EVENT_TYPE_LOCAL_CREATED: string;
2
-export const EVENT_TYPE_LOCAL_CHANGED: string;
3
-export const EVENT_TYPE_LOCAL_ENDED: string;
4
-export const EVENT_TYPE_REMOTE_CREATED: string;
5
-export const EVENT_TYPE_REMOTE_ENDED: string;
6
-export const TRACK_MUTE_CHANGED: string;

Laden…
Abbrechen
Speichern