{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "has-property-value-true",
      "spotlight": true,
      "description": "With two arguments, returns true when some struct's property equals the value.",
      "template": "{{ items | has: \"k\" \"b\" }}",
      "context": {
        "items": [
          {
            "k": "a"
          },
          {
            "k": "b"
          }
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "has-property-value-false",
      "description": "With two arguments, returns false when no struct's property equals the value.",
      "template": "{{ items | has: \"k\" \"z\" }}",
      "context": {
        "items": [
          {
            "k": "a"
          },
          {
            "k": "b"
          }
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "false"
      }
    },
    {
      "name": "has-property-truthy",
      "spotlight": true,
      "description": "With one argument, returns true when some struct's property is truthy.",
      "template": "{{ items | has: \"ok\" }}",
      "context": {
        "items": [
          {
            "ok": false
          },
          {
            "ok": true
          }
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "has-non-list-is-null",
      "description": "has operates only on lists; a string input yields null.",
      "template": "{{ x | has: \"k\" }}",
      "context": {
        "x": "hi"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "has-non-struct-contents-is-null",
      "description": "has expects a list of structs; non-struct contents yield null.",
      "template": "{{ xs | has: \"k\" }}",
      "context": {
        "xs": [
          1
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null"
      }
    },
    {
      "name": "has-zero-args-is-error",
      "description": "Zero arguments is an arity error.",
      "template": "{{ items | has }}",
      "context": {
        "items": [
          {
            "k": "a"
          }
        ]
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "has-three-args-is-error",
      "description": "More than two arguments is an arity error.",
      "template": "{{ items | has: \"k\" \"a\" \"b\" }}",
      "context": {
        "items": [
          {
            "k": "a"
          }
        ]
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
