Flows › DomEngine e23531a19

story[0] 2 expects pass

· 2 ms · ran 21 times in a row · specs: spec[0]

JSON
Expects
✓2payload is 7.0
✓4sizeOf("abc") is 3
Resulting value (payload)
7
Trace
msgtotal(items=[{qty: 2, price: 1.5}, {qty: 1, price: 4.0}])line 1
rulerule total (line 1)line 1
valpayload = 7.0line 1
expectpayload is 7.0 ✓line 2
expectskipped: payload > 100 ✓line 3
expectsizeOf("abc") is 3 ✓line 4
Story syntax tree
$send total (items = [{qty: 2, price: 1.5}, {qty: 1, price: 4.0}])
{
  "src": "$send total (items = [{qty: 2, price: 1.5}, {qty: 1, price: 4.0}])",
  "k": "step",
  "stmt": {
    "k": "send",
    "msg": "total",
    "args": [
      {
        "name": "items",
        "e": {
          "k": "arr",
          "items": [
            {
              "k": "obj",
              "fields": [
                {
                  "key": "qty",
                  "e": {
                    "k": "lit",
                    "v": 2
                  }
                },
                {
                  "key": "price",
                  "e": {
                    "k": "lit",
                    "v": 1.5
                  }
                }
              ]
            },
            {
              "k": "obj",
              "fields": [
                {
                  "key": "qty",
                  "e": {
                    "k": "lit",
                    "v": 1
                  }
                },
                {
                  "key": "price",
                  "e": {
                    "k": "lit",
                    "v": 4
                  }
                }
              ]
            }
          ]
        }
      }
    ]
  }
}
payload is 7.0
{
  "src": "payload is 7.0",
  "k": "expect",
  "cond": {
    "k": "bin",
    "op": "==",
    "l": {
      "k": "ref",
      "name": "payload"
    },
    "r": {
      "k": "lit",
      "v": 7
    }
  }
}
payload > 100
{
  "src": "payload > 100",
  "k": "expect",
  "cond": {
    "k": "bin",
    "op": ">",
    "l": {
      "k": "ref",
      "name": "payload"
    },
    "r": {
      "k": "lit",
      "v": 100
    }
  },
  "when": {
    "k": "lit",
    "v": false
  }
}
sizeOf("abc") is 3
{
  "src": "sizeOf(\"abc\") is 3",
  "k": "expect",
  "cond": {
    "k": "bin",
    "op": "==",
    "l": {
      "k": "call",
      "tool": "sizeOf",
      "args": [
        {
          "e": {
            "k": "str",
            "parts": [
              "abc"
            ]
          }
        }
      ]
    },
    "r": {
      "k": "lit",
      "v": 3
    }
  }
}