Closed emfomy closed 3 years ago
PactumJS (v3.0.18) now supports passing custom options to json schema validations.
expectJsonSchema({ schema }, { options });
await pactum.spec()
.get('api/get')
.expectJsonSchema(
{
type: 'object',
properties: {
method: {
type: 'string',
format: 'only-get'
}
}
},
{
formats: {
'only-get': /^GET$/
}
}
);
Is your feature request related to a problem? Please describe. I want to use external JSON schema provided in @exodus/schemasafe
Describe the solution you'd like Please add an optional argument for external schemas to
expectJsonSchema
andjsonSchema
methods.Describe alternatives you've considered Or maybe add a global setting for external schemas.