Skip to content

Commit

Permalink
fix(socketio): allow emit to be array of strings in validate-script
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Sep 26, 2023
1 parent f9f2fe9 commit 91d1da7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/artillery/lib/util/validate-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
};
Expand Down

0 comments on commit 91d1da7

Please sign in to comment.