mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
allow say.text to accept either a string or an array of strings
This commit is contained in:
9
test/data/good/say-text-array.json
Normal file
9
test/data/good/say-text-array.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"say": {
|
||||
"text": ["hi there", "John"],
|
||||
"synthesizer": {
|
||||
"vendor": "google",
|
||||
"language": "en-US"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
test/data/good/say.json
Normal file
9
test/data/good/say.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"say": {
|
||||
"text": "hi there",
|
||||
"synthesizer": {
|
||||
"vendor": "google",
|
||||
"language": "en-US"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,12 @@ test('app payload parsing tests', (t) => {
|
||||
task = makeTask(logger, require('./data/good/pause'));
|
||||
t.ok(task.name === 'pause', 'parsed pause');
|
||||
|
||||
task = makeTask(logger, require('./data/good/say'));
|
||||
t.ok(task.name === 'say', 'parsed say');
|
||||
|
||||
task = makeTask(logger, require('./data/good/say-text-array'));
|
||||
t.ok(task.name === 'say', 'parsed say with multiple segments');
|
||||
|
||||
const alt = require('./data/good/alternate-syntax');
|
||||
const normalize = require('../lib/utils/normalize-jambones');
|
||||
normalize(logger, alt).forEach((t) => {
|
||||
|
||||
Reference in New Issue
Block a user