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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/validate.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yamltest",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Declarative YAML-based HTTP, command, and Kubernetes test runner",
5
5
  "main": "./src/index.js",
6
6
  "bin": {
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: ['source'],
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,