您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AuthenticationEvents.spec.ts 877B

1234567891011121314151617181920212223
  1. import * as exported from "./AuthenticationEvents";
  2. // this test is brittle on purpose because it's designed to ensure that the TypeScript conversion maintains backward compatibility
  3. describe( "/service/authentication/AuthenticationEvents members", () => {
  4. const {
  5. IDENTITY_UPDATED,
  6. AuthenticationEvents,
  7. ...others
  8. } = exported as any; // TODO: remove cast after typescript conversion
  9. it( "known members", () => {
  10. expect( IDENTITY_UPDATED ).toBe( 'authentication.identity_updated' );
  11. if ( AuthenticationEvents ) {
  12. expect( AuthenticationEvents.IDENTITY_UPDATED ).toBe( 'authentication.identity_updated' );
  13. }
  14. } );
  15. it( "unknown members", () => {
  16. const keys = Object.keys( others );
  17. expect( keys ).withContext( `Extra members: ${ keys.join( ", " ) }` ).toEqual( [] );
  18. } );
  19. } );