BTLTJNVMBUF5FTU
const assert = require(’power-assert’)
const { execFile } = require(’child_process’)
describe(’test by ask-cli’, () => {
it(’should return valid response when send invocation name’, (done) => {
execFile(’ask’, [
’simulate’, ’-s’, ’amzn1.ask.skill.xxx’,
’-l’, ’en-US’, ’-t’, ’open greeter’
], (error, stdout, stderr) => {
if (error) {
assert.deepEqual(error, {})
} else {
const { result } = JSON.parse(stdout)
const { invocationResponse } = result.skillExecutionInfo
const { response } = invocationResponse.body
assert.equal(response.card.content.indexOf(’
’), -1)
assert.equal(response.card.content.indexOf(’undefined’), -1)
}
done() })
}) })
Ҿ༻ɿԶ͕ͨͪΓͨͳ͔ͬͨ"MFYBͷ