Skip to content

Commit

Permalink
feat(matching): Test for skipping and fuzzy partial matching
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Oct 27, 2018
1 parent 7d7337e commit 6fb6fcc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/combined.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ describe('Intents', function() {
});
});

it('Partial (with skippable): orders Test', function() {
return intents.match('orders Test', { partial: true })
.then(results => {
expect(results.matches.length).to.equal(1);
expect(results.best.intent).to.equal('customer:orders');
expect(results.best.values.customer).to.equal('Test');
});
});

it('Partial and fuzzy: orders for Test', function() {
return intents.match('o Test', { partial: true, fuzzy: true })
.then(results => {
expect(results.matches.length).to.equal(1);
expect(results.best.intent).to.equal('customer:orders');
expect(results.best.values.customer).to.equal('Test');
});
});

it('Partial: assign', function() {
return intents.match('assign', { partial: true })
.then(results => {
Expand Down

0 comments on commit 6fb6fcc

Please sign in to comment.