mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
PR feedback pt3
This commit is contained in:
parent
39187c0ce6
commit
f11a6aeb06
1 changed files with 22 additions and 0 deletions
|
@ -65,3 +65,25 @@ test('should validate and throw error when actionTypeConfig is invalid', () => {
|
|||
`"actionTypeConfig invalid: child \\"param1\\" fails because [\\"param1\\" is required]"`
|
||||
);
|
||||
});
|
||||
|
||||
test('should not return values when actionTypeConfig is invalid', () => {
|
||||
expect(() =>
|
||||
validateActionTypeConfig(
|
||||
{
|
||||
id: 'my-action-type',
|
||||
name: 'My action type',
|
||||
validate: {
|
||||
config: Joi.object()
|
||||
.keys({
|
||||
param1: Joi.number().required(),
|
||||
})
|
||||
.required(),
|
||||
},
|
||||
async executor() {},
|
||||
},
|
||||
{ param1: 'my secret value' }
|
||||
)
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"actionTypeConfig invalid: child \\"param1\\" fails because [\\"param1\\" must be a number]"`
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue