Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ASK CLIでAlexaとLambdaを簡単管理

tochi
November 03, 2018

ASK CLIでAlexaとLambdaを簡単管理

JAWS FESTA 2018 Osaka

資料内の動画も含んだ内容はこちら
https://www.aguuu.com/archives/2018/11/jawsfesta2018osaka/

tochi

November 03, 2018
Tweet

More Decks by tochi

Other Decks in Technology

Transcript

  1. 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(’<p>’), -1) assert.equal(response.card.content.indexOf(’undefined’), -1) } done() }) }) }) Ҿ༻ɿԶ͕ͨͪ஌Γͨͳ͔ͬͨ"MFYBͷ࿩