Browse Source

Add and update unit tests for localization and validation

Added a test suite for APPLICATION_LOCALIZATION_DATA to verify its structure and existence. Fixed indentation in validation-utils.spec.ts to improve code readability.
pull/23460/head
Fahri Gedik 1 year ago
parent
commit
2e08a05c49
  1. 7
      npm/ng-packs/packages/core/src/lib/tests/application-localization.service.spec.ts
  2. 2
      npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts

7
npm/ng-packs/packages/core/src/lib/tests/application-localization.service.spec.ts

@ -15,3 +15,10 @@ export const APPLICATION_LOCALIZATION_DATA = {
},
},
};
describe('APPLICATION_LOCALIZATION_DATA', () => {
it('should export localization data', () => {
expect(APPLICATION_LOCALIZATION_DATA).toBeDefined();
expect(APPLICATION_LOCALIZATION_DATA.resources).toBeDefined();
});
});

2
npm/ng-packs/packages/theme-shared/src/lib/tests/validation-utils.spec.ts

@ -66,7 +66,7 @@ describe('ValidationUtils', () => {
const capitalValidator = validatePassword('capital');
const specialValidator = validatePassword('special');
expect(numberValidator({ value: 'abc123' } as any)).toBeNull();
expect(numberValidator({ value: 'abc123' } as any)).toBeNull();
expect(smallValidator({ value: 'abc123' } as any)).toBeNull();
expect(capitalValidator({ value: 'ABC123' } as any)).toBeNull();
expect(specialValidator({ value: 'abc@123' } as any)).toBeNull();

Loading…
Cancel
Save