@@ -42,11 +42,11 @@ describe('formValidation tests', () => {
4242 const viewModel = { } ;
4343 const key = 'fullname' ;
4444 const value = '' ;
45- const filter = undefined ;
45+ const eventsFilter = undefined ;
4646
4747 // Act
4848 const formValidation = new BaseFormValidation ( validationConstraints ) ;
49- formValidation . validateField ( viewModel , key , value , filter ) ;
49+ formValidation . validateField ( viewModel , key , value , eventsFilter ) ;
5050
5151 // Assert
5252 expect ( validateSingleField . calledOnce ) . to . be . true ;
@@ -299,7 +299,7 @@ describe('formValidation tests', () => {
299299 const addFieldValidation = sinon . stub ( ValidationEngine . prototype , 'addFieldValidation' , ( ) => { } ) ;
300300 const validation1 = ( ) => new FieldValidationResult ( ) ;
301301 const validation2 = ( ) => new FieldValidationResult ( ) ;
302- const filters = undefined ;
302+ const eventsFilter = undefined ;
303303 const customParams = undefined ;
304304 const validationConstraints : ValidationConstraints = {
305305 fields : {
@@ -317,8 +317,8 @@ describe('formValidation tests', () => {
317317
318318 // Assert
319319 expect ( addFieldValidation . calledTwice ) . to . be . true ;
320- expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , filters , customParams ) ) . to . be . true ;
321- expect ( addFieldValidation . calledWithExactly ( 'property2' , validation2 , filters , customParams ) ) . to . be . true ;
320+ expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , eventsFilter , customParams ) ) . to . be . true ;
321+ expect ( addFieldValidation . calledWithExactly ( 'property2' , validation2 , eventsFilter , customParams ) ) . to . be . true ;
322322 } ) ) ;
323323
324324 it ( 'should add multiple validations given a property haveing multiple FieldValidationConstraints' , sinon . test ( function ( ) {
@@ -327,7 +327,7 @@ describe('formValidation tests', () => {
327327 const addFieldValidation = sinon . stub ( ValidationEngine . prototype , 'addFieldValidation' , ( ) => { } ) ;
328328 const validation1 = ( ) => new FieldValidationResult ( ) ;
329329 const validation2 = ( ) => new FieldValidationResult ( ) ;
330- const filters = undefined ;
330+ const eventsFilter = undefined ;
331331 const customParams = undefined ;
332332 const validationConstraints : ValidationConstraints = {
333333 fields : {
@@ -343,8 +343,8 @@ describe('formValidation tests', () => {
343343
344344 // Assert
345345 expect ( addFieldValidation . calledTwice ) . to . be . true ;
346- expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , filters , customParams ) ) . to . be . true ;
347- expect ( addFieldValidation . calledWithExactly ( 'property1' , validation2 , filters , customParams ) ) . to . be . true ;
346+ expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , eventsFilter , customParams ) ) . to . be . true ;
347+ expect ( addFieldValidation . calledWithExactly ( 'property1' , validation2 , eventsFilter , customParams ) ) . to . be . true ;
348348 } ) ) ;
349349
350350 it ( 'should pass FieldValidationConstraints to ValidationEngine' , sinon . test ( function ( ) {
@@ -353,13 +353,13 @@ describe('formValidation tests', () => {
353353 const addFieldValidation = sinon . stub ( ValidationEngine . prototype , 'addFieldValidation' , ( ) => { } ) ;
354354 const validation1 = ( ) => new FieldValidationResult ( ) ;
355355 const customParams = { foo : 'bar' } ;
356- const eventFilters = { OnBlur : true } ;
356+ const eventsFilter = { OnBlur : true } ;
357357 const validationConstraints : ValidationConstraints = {
358358 fields : {
359359 property1 : [
360360 {
361361 validator : validation1 ,
362- eventFilters ,
362+ eventsFilter ,
363363 customParams,
364364 } ,
365365 ]
@@ -370,7 +370,7 @@ describe('formValidation tests', () => {
370370 const formValidation = createFormValidation ( validationConstraints ) ;
371371
372372 // Assert
373- expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , eventFilters , customParams ) ) . to . be . true ;
373+ expect ( addFieldValidation . calledWithExactly ( 'property1' , validation1 , eventsFilter , customParams ) ) . to . be . true ;
374374 } ) ) ;
375375
376376 } ) ;
0 commit comments