Quester Studio

assert

Fail the flow when JMESPath checks on the previous output do not pass

Runs one or more checks against the previous node’s output. On failure, execution throws and the flow stops.

Check path values are JMESPath from the previous root (status, body.id) — not previous.status and not run-input paths (use templates / an input node first). See How flows work.

in ×1 assert out ×1
JMESPath checks or throw. Multiple outgoing edges (fan-out) share the same output.

Data

FieldTypeDescription
labelstringOptional UI label
checksarrayrequired (min 1)

Check object

FieldTypeDescription
pathstringJMESPath against previous output
opstringOptional operator (default truthy, or eq when equals is set)
valueanyComparison value for ops that need one
equalsanyLegacy alias for op: "eq" + value

Operators

opNeeds valuePasses when
eqyesDeep equal (JSON.stringify)
neqyesNot deep equal
gt / gte / lt / lteyesNumeric compare when both sides are numbers (or numeric strings); otherwise string compare
containsyesString includes, or array has a deep-equal element
notContainsyesInverse of contains
startsWith / endsWithyesString prefix / suffix
matchesyesRegExp(value).test(actual) on a string (or stringified number/boolean)
existsnoValue is not null / undefined
truthynoJavaScript truthiness
falsynoJavaScript falsiness

Legacy forms still work:

  • { "path": "body.id" }truthy
  • { "path": "status", "equals": 200 }eq

Input / output

Value
Execute inputPrevious node output
Output{ "ok": true, "failures": [] } on success
On failureThrows Assertion failed: …

Examples

Status in 2xx

{
  "id": "assertOk",
  "type": "assert",
  "data": {
    "checks": [
      { "path": "status", "op": "gte", "value": 200 },
      { "path": "status", "op": "lt", "value": 300 }
    ]
  }
}

Body message contains text

{
  "checks": [
    { "path": "body.message", "op": "contains", "value": "created" }
  ]
}

Legacy equals (still valid)

{
  "checks": [{ "path": "status", "equals": 200 }]
}

Multiple checks

{
  "id": "assertLogin",
  "type": "assert",
  "data": {
    "label": "Login ok",
    "checks": [
      { "path": "status", "op": "eq", "value": 201 },
      { "path": "body.id", "op": "exists" },
      { "path": "body.email", "op": "eq", "value": "demo@example.com" }
    ]
  }
}

Nested / object equality

eq (and legacy equals) compares with exact deep equality (JSON.stringify on both sides). The value at path must match fully — same keys, same nested values. Extra fields on the actual value cause a failure.

Prefer asserting fields separately when you only care about some keys:

{
  "checks": [
    { "path": "body.ok", "op": "eq", "value": true },
    { "path": "body.role", "op": "eq", "value": "admin" }
  ]
}