fbp-spec
Version:
Data-driven FBP component/graph testing tool
38 lines (35 loc) • 874 B
YAML
id: expectation.json
"$schema": "http://json-schema.org/draft-04/schema"
title: Expectation
description: "An expectation on data."
type: object
properties:
path:
"$ref": "base.json#/definitions/JsonPath"
description: 'JSONPath to run messages data through. Result is passed to assertion predicate.'
# Different assertions operators
equals:
description: 'Strict equality'
above:
description: 'Greater than (>)'
type: number
below:
description: 'Less than than (<)'
type: number
type:
description: 'JSON type'
type: string
haveKeys:
description: 'Object has only these keys'
type: array
items:
type: string
includeKeys:
description: 'Object has at least these keys'
type: array
items:
type: string
contains:
description: 'String or array contains substring/item'
required: []