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.

JingleSessionState.spec.ts 967B

123456789101112131415161718192021222324252627282930
  1. import * as exported from "./JingleSessionState";
  2. // this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
  3. describe( "/modules/xmpp/JingleSessionState members", () => {
  4. const {
  5. PENDING,
  6. ACTIVE,
  7. ENDED,
  8. JingleSessionState,
  9. ...others
  10. } = exported;
  11. it( "known members", () => {
  12. expect( PENDING ).toBe( 'pending' );
  13. expect( ACTIVE ).toBe( 'active' );
  14. expect( ENDED ).toBe( 'ended' );
  15. expect( JingleSessionState ).toBeDefined();
  16. expect( JingleSessionState.PENDING ).toBe( 'pending' );
  17. expect( JingleSessionState.ACTIVE ).toBe( 'active' );
  18. expect( JingleSessionState.ENDED ).toBe( 'ended' );
  19. } );
  20. it( "unknown members", () => {
  21. const keys = Object.keys( others );
  22. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  23. } );
  24. } );