Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Scar26 <mmatty26@gmail.com>
  • Loading branch information
Scar26 committed Aug 20, 2020
1 parent d24ac7c commit b065c9a
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions test/initialize-spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const chai = require('chai')
const expect = chai.expect
const juice = require('../index')

const trainingSet = {
lang: 'en',
intents: [
Expand All @@ -23,16 +24,38 @@ const trainingSet = {
{
question: 'howdy',
intent: 'greetings.hello'
},
{
question: 'how much is X',
intent: 'queries.productprice'
},
{
question: 'how much does X cost',
intent: 'queries.productprice'
}
],
answers: [
{
intent: 'greetings.bye',
answer: 'Ok Cya'
answer: {
action: 'response',
body: 'Ok Cya'
}
},
{
intent: 'greetings.hello',
answer: 'Hello <customer-name>'
answer: {
action: 'response',
body: 'Hello <customer-name>'
}
},
{
intent: 'queries.productprice',
answer: {
action: 'function',
handler: 'productPrice',
body: ''
}
}
]
}
Expand Down

0 comments on commit b065c9a

Please sign in to comment.