diff --git a/packages/artillery/lib/util/validate-script.js b/packages/artillery/lib/util/validate-script.js index cab4f0b62c..1c9a7b09e5 100644 --- a/packages/artillery/lib/util/validate-script.js +++ b/packages/artillery/lib/util/validate-script.js @@ -50,10 +50,13 @@ const httpItems = { const socketioItems = { emit: Joi.any().when(Joi.ref('....engine'), { is: 'socketio', - then: Joi.object({ - channel: Joi.string(), - data: Joi.any() - }), + then: Joi.alternatives( + Joi.object({ + channel: Joi.string(), + data: Joi.any() + }), + Joi.array().items(Joi.string()) + ), otherwise: Joi.any() }) };