Skip to content

Commit

Permalink
feat: forward settings to nlu spell-checker
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-lara committed Mar 1, 2022
1 parent 48292d4 commit e62b64a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/nlu/test/nlu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ describe('NLU', () => {
expect(nlu.settings.nonedeltaMultiplier).toEqual(1.2);
expect(nlu.settings.spellCheckDistance).toEqual(1);
});
test('The settings are forwarded to spell checker constructor', () => {
const nlu = new Nlu({
spellCheckDistance: 3,
spellCheck: true,
minLength: 2,
});
expect(nlu.spellCheck.settings.spellCheckDistance).toEqual(3);
expect(nlu.spellCheck.settings.spellCheck).toBeTruthy();
expect(nlu.spellCheck.settings.minLength).toEqual(2);
});
});

describe('Prepare', () => {
Expand Down

0 comments on commit e62b64a

Please sign in to comment.