{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "default-null-input-uses-default",
      "spotlight": true,
      "description": "A null (missing) input triggers the fallback.",
      "template": "{{ missing | default: \"fallback\" }}",
      "context": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "fallback"
      }
    },
    {
      "name": "default-explicit-null-uses-default",
      "description": "An explicit null value triggers the fallback.",
      "template": "{{ x | default: \"fallback\" }}",
      "context": {
        "x": null
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "fallback"
      }
    },
    {
      "name": "default-empty-string-uses-default",
      "description": "An empty string input triggers the fallback.",
      "template": "{{ x | default: \"fallback\" }}",
      "context": {
        "x": ""
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "fallback"
      }
    },
    {
      "name": "default-empty-list-uses-default",
      "description": "An empty list input triggers the fallback.",
      "template": "{{ xs | default: \"fallback\" }}",
      "context": {
        "xs": []
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "fallback"
      }
    },
    {
      "name": "default-non-empty-string-passes-through",
      "spotlight": true,
      "description": "A non-empty string is returned unchanged.",
      "template": "{{ x | default: \"fallback\" }}",
      "context": {
        "x": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "hello"
      }
    },
    {
      "name": "default-non-empty-list-passes-through",
      "description": "A non-empty list is returned unchanged.",
      "template": "{{ xs | default: \"fallback\" }}",
      "context": {
        "xs": [
          1,
          2,
          3
        ]
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[1,2,3]"
      }
    },
    {
      "name": "default-false-passes-through",
      "description": "A false boolean passes through unchanged (allow_false is always true).",
      "template": "{{ x | default: \"fallback\" }}",
      "context": {
        "x": false
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "false"
      }
    },
    {
      "name": "default-zero-passes-through",
      "description": "Zero passes through unchanged.",
      "template": "{{ x | default: \"fallback\" }}",
      "context": {
        "x": 0
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "0"
      }
    },
    {
      "name": "default-no-arg-is-error",
      "description": "Calling default with no argument is an arity error.",
      "template": "{{ x | default }}",
      "context": {
        "x": null
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "default-two-args-is-error",
      "description": "Calling default with two arguments is an arity error.",
      "template": "{{ x | default: \"a\" \"b\" }}",
      "context": {
        "x": null
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
