modified lib-jitsi-meet dev repo
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.

JitsiConnectionErrors.spec.ts 1.3KB

123456789101112131415161718192021222324252627282930313233
  1. import * as exported from "./JitsiConnectionErrors";
  2. // this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
  3. describe( "/JitsiConnectionErrors members", () => {
  4. const {
  5. CONNECTION_DROPPED_ERROR,
  6. OTHER_ERROR,
  7. PASSWORD_REQUIRED,
  8. SERVER_ERROR,
  9. JitsiConnectionErrors,
  10. ...others
  11. } = exported;
  12. it( "known members", () => {
  13. expect( CONNECTION_DROPPED_ERROR ).toBe( 'connection.droppedError' );
  14. expect( OTHER_ERROR ).toBe( 'connection.otherError' );
  15. expect( PASSWORD_REQUIRED ).toBe( 'connection.passwordRequired' );
  16. expect( SERVER_ERROR ).toBe( 'connection.serverError' );
  17. expect( JitsiConnectionErrors ).toBeDefined();
  18. expect( JitsiConnectionErrors.CONNECTION_DROPPED_ERROR ).toBe( 'connection.droppedError' );
  19. expect( JitsiConnectionErrors.OTHER_ERROR ).toBe( 'connection.otherError' );
  20. expect( JitsiConnectionErrors.PASSWORD_REQUIRED ).toBe( 'connection.passwordRequired' );
  21. expect( JitsiConnectionErrors.SERVER_ERROR ).toBe( 'connection.serverError' );
  22. } );
  23. it( "unknown members", () => {
  24. const keys = Object.keys( others );
  25. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  26. } );
  27. } );