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

CameraFacingMode.spec.ts 720B

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