json response within <speak> is coming as undefined!

10 views
Skip to first unread message

jyo rani

unread,
Nov 5, 2020, 11:17:39 PM11/5/20
to Mocha
I am getting this response for my PoST request. Not sure why text between <speak> </speak> is coming as undefined,. can you help?
Response 
{ version: '1.0',
  response:
   { outputSpeech:
      { type: 'SSML',
        ssml:
         '<speak>Great! You have been identified. <break time="200ms"/>undefined</speak>' }
}}}

expected text in the speak tag - "\"Great! You have been identified. <break time=\\\"200ms\\\"/> You can check your balance,So how can I help?\

My script// i am getting response as 200 and all other params are coming as expected.

chai.request(url)
.post('/skxxxxx/ala')
.set(config.headers)
.send(config.pinBodyRequest)
 .end(function(err, res) {
done(err);
})
});

assert.equal(res.status, 200, "Response status not matching")
console.log(res.body)
Reply all
Reply to author
Forward
0 new messages