You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CameraFacingMode.spec.ts 904B

1234567891011121314151617181920212223242526
  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. ENVIRONMENT,
  6. USER,
  7. CameraFacingMode,
  8. ...others
  9. } = exported as any; // TODO: remove cast after typescript conversion
  10. it( "known members", () => {
  11. expect( ENVIRONMENT ).toBe( 'environment' );
  12. expect( USER ).toBe( 'user' );
  13. if ( CameraFacingMode ) {
  14. expect( CameraFacingMode.ENVIRONMENT ).toBe( 'environment' );
  15. expect( CameraFacingMode.USER ).toBe( 'user' );
  16. }
  17. } );
  18. it( "unknown members", () => {
  19. const keys = Object.keys( others );
  20. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  21. } );
  22. } );