yamltest 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/validate.js +5 -3
package/package.json
CHANGED
package/src/validate.js
CHANGED
|
@@ -27,8 +27,8 @@ const headerExpectationItem = {
|
|
|
27
27
|
required: ['name', 'comparator'],
|
|
28
28
|
properties: {
|
|
29
29
|
name: { type: 'string' },
|
|
30
|
-
comparator: { type: 'string', enum: ['equals', 'contains', 'matches', 'exists'] },
|
|
31
|
-
value: { type: 'string' },
|
|
30
|
+
comparator: { type: 'string', enum: ['equals', 'contains', 'matches', 'exists', 'greaterThan', 'lessThan'] },
|
|
31
|
+
value: { oneOf: [{ type: 'string' }, { type: 'number' }] },
|
|
32
32
|
negate: { type: 'boolean' },
|
|
33
33
|
},
|
|
34
34
|
additionalProperties: false,
|
|
@@ -421,7 +421,7 @@ const httpBodyComparisonConfigSchema = {
|
|
|
421
421
|
|
|
422
422
|
const testDefinitionSchema = {
|
|
423
423
|
type: 'object',
|
|
424
|
-
required: [
|
|
424
|
+
required: [],
|
|
425
425
|
properties: {
|
|
426
426
|
name: { type: 'string' },
|
|
427
427
|
retries: { type: 'integer', minimum: 0 },
|
|
@@ -458,6 +458,7 @@ const testDefinitionSchema = {
|
|
|
458
458
|
{
|
|
459
459
|
if: { required: ['http'] },
|
|
460
460
|
then: {
|
|
461
|
+
required: ['source'],
|
|
461
462
|
properties: {
|
|
462
463
|
expect: httpExpectSchema,
|
|
463
464
|
setVars: httpSetVarsSchema,
|
|
@@ -468,6 +469,7 @@ const testDefinitionSchema = {
|
|
|
468
469
|
{
|
|
469
470
|
if: { required: ['command'] },
|
|
470
471
|
then: {
|
|
472
|
+
required: ['source'],
|
|
471
473
|
properties: {
|
|
472
474
|
expect: commandExpectSchema,
|
|
473
475
|
setVars: commandSetVarsSchema,
|