Skip to content

Commit

Permalink
format example code
Browse files Browse the repository at this point in the history
  • Loading branch information
xqbumu committed Feb 5, 2018
1 parent 6f8f9c9 commit ced55fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ const app = require('@rokid/ams')();
app.on('request', (data) => {
// handler
});
app.start();
app.start();
24 changes: 14 additions & 10 deletions example/tests/cloud-confirm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,40 @@ test('test 7 play', (t) => {
'intent': 'play_random',
'pattern': '^$iwant?$play$one?$keyword$',
'slots': {}
}, {
'appId':'RCAC74F187F34C94B93EE3BAECFCE2E3',
'response': {
}, {
'appId': 'RCAC74F187F34C94B93EE3BAECFCE2E3',
'response': {
'action': {
'version': '2.0.0',
'type': 'NORMAL',
'form': 'scene',
'shouldEndSession': true,
'directives': [{
'type':'voice',
'type': 'voice',
'action': 'PLAY',
'disableEvent':false,
'disableEvent': false,
'item': {
'itemId':'newstestitemid',
'itemId': 'newstestitemid',
'tts': '晚上好,若琪为您播放晚间新闻摘要,首先我们来看看社会新闻。'
}
}, {
'type':'confirm',
'type': 'confirm',
'confirmIntent': 'nlp intent to confirm',
'confirmSlot': 'nlp slot to confirm',
'optionWords': ['word1', 'word2']
}]
}
},
'startWithActiveWord':false,
'version':'2.0.0'
'startWithActiveWord': false,
'version': '2.0.0'
});

Promise.all([
t.assert('Voice.FINISHED', {voice: {item: 'newstestitemid'}}),
t.assert('Voice.FINISHED', {
voice: {
item: 'newstestitemid'
}
}),
t.assert('siren.statechange', 'open'),
]).then(() => {
t.done();
Expand Down

0 comments on commit ced55fe

Please sign in to comment.