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.

constants.spec.ts 574B

12345678910111213141516171819
  1. import * as exported from "./constants";
  2. // this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
  3. describe( "/service/statistics/constants members", () => {
  4. const {
  5. LOCAL_JID,
  6. ...others
  7. } = exported;
  8. it( "known members", () => {
  9. expect( LOCAL_JID ).toBe( 'local' );
  10. } );
  11. it( "unknown members", () => {
  12. const keys = Object.keys( others );
  13. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  14. } );
  15. } );