File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export default class Rule {
129129 throw new Error ( 'rule not found' ) ;
130130 }
131131
132- _rule . onFaliure = _theFunct ;
132+ _rule . onFailure = _theFunct ;
133133 return this ;
134134 }
135135
Original file line number Diff line number Diff line change @@ -467,16 +467,16 @@ describe('Rule Class', () => {
467467 it ( 'should set the onFailure function' , ( ) => {
468468 const rule = new Rule ( 'testOnFailureRule' ) ;
469469 const failureFunction = ( _event , _almanac ) => `Failure with ${ _event } and ${ _almanac } ` ;
470- rule . onFaliure ( failureFunction ) ;
470+ rule . onFailure ( failureFunction ) ;
471471
472472 const ruleData = Name . find ( 'testOnFailureRule' ) ;
473- ruleData . should . have . property ( 'onFaliure ' ) . that . is . a ( 'function' ) ;
474- ruleData . onFaliure ( 'event' , 'almanac' ) . should . equal ( 'Failure with event and almanac' ) ;
473+ ruleData . should . have . property ( 'onFailure ' ) . that . is . a ( 'function' ) ;
474+ ruleData . onFailure ( 'event' , 'almanac' ) . should . equal ( 'Failure with event and almanac' ) ;
475475 } ) ;
476476
477477 it ( 'should throw an error if onFailure parameter is not a function' , ( ) => {
478478 const rule = new Rule ( 'testOnFailureRule34' ) ;
479- ( ( ) => rule . onFaliure ( 'notAFunction' ) ) . should . throw ( '_funct must be a function.' ) ;
479+ ( ( ) => rule . onFailure ( 'notAFunction' ) ) . should . throw ( '_funct must be a function.' ) ;
480480 } ) ;
481481 } ) ;
482482
You can’t perform that action at this time.
0 commit comments