Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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