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 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. } );