From 77608b9ef00059b9dd8e0e95f3e3fee3b7a2f238 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Tue, 1 Dec 2020 20:18:36 +0300 Subject: [PATCH] test: remove pristine specs from validators suite --- .../core/src/lib/tests/validators.spec.ts | 48 ------------------- 1 file changed, 48 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts index 179bcccaaa..5d666a24c3 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/validators.spec.ts @@ -37,14 +37,6 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }); - - it('should return null when control is pristine', () => { - const invalidNumber = '5105105105105101'; - const control = new FormControl(invalidNumber, [validateCreditCard()]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); describe('Email Validator', () => { @@ -81,14 +73,6 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }, ); - - it('should return null when control is pristine', () => { - const invalidDate = ''; - const control = new FormControl(invalidDate, [validateMinAge({ age: Infinity })]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); describe('Range Validator', () => { @@ -115,14 +99,6 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }, ); - - it('should return null when control is pristine', () => { - const invalidUrl = ''; - const control = new FormControl(invalidUrl, [validateRange({ minimum: 3 })]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); describe('Required Validator', () => { @@ -148,14 +124,6 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }, ); - - it('should return null when control is pristine', () => { - const invalidUrl = ''; - const control = new FormControl(invalidUrl, [validateRequired()]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); describe('String Length Validator', () => { @@ -178,14 +146,6 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }, ); - - it('should return null when control is pristine', () => { - const invalidUrl = ''; - const control = new FormControl(invalidUrl, [validateStringLength({ minimumLength: 3 })]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); describe('Url Validator', () => { @@ -217,13 +177,5 @@ describe('Validators', () => { expect(control.errors).toEqual(expected); }); - - it('should return null when control is pristine', () => { - const invalidUrl = 'x'; - const control = new FormControl(invalidUrl, [validateUrl()]); - // control is not dirty - - expect(control.valid).toBe(true); - }); }); });