您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MediaDirection.spec.ts 834B

123456789101112131415161718192021222324
  1. import * as exported from "./MediaDirection";
  2. // this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
  3. describe( "/service/RTC/MediaDirection members", () => {
  4. const {
  5. MediaDirection,
  6. ...others
  7. } = exported;
  8. it( "known members", () => {
  9. expect( MediaDirection ).toBeDefined();
  10. expect( MediaDirection.INACTIVE ).toBe( 'inactive' );
  11. expect( MediaDirection.RECVONLY ).toBe( 'recvonly' );
  12. expect( MediaDirection.SENDONLY ).toBe( 'sendonly' );
  13. expect( MediaDirection.SENDRECV ).toBe( 'sendrecv' );
  14. } );
  15. it( "unknown members", () => {
  16. const keys = Object.keys( others );
  17. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  18. } );
  19. } );