Skip to content

Commit 92b3808

Browse files
committed
Fixed more typos
1 parent 334a29c commit 92b3808

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/rule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

test/rulesEngine.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)