{
  "schema": "https://bars.commonsware.com/conformance/schema/partials-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "unknown-dynamic-key-soft-fails-and-emits-nothing",
      "description": "A dynamic {{> (expr) }} key that resolves to an unknown key is a soft failure: it emits nothing and reports one UnresolvedReference event. The event is stamped at the root, so its partialStack is empty.",
      "template": "[{{> (which) }}]",
      "context": {
        "which": "nope"
      },
      "partials": {},
      "expect": {
        "kind": "output",
        "expectedOutput": "[]",
        "softFails": [
          {
            "category": "UnresolvedReference",
            "partialStack": []
          }
        ]
      }
    },
    {
      "name": "recursion-limit-soft-fails-and-stops",
      "description": "A self-recursive partial rendered past maxPartialDepth soft-fails once with a RecursionLimit event and stops descending; the output is the portion rendered before the ceiling was hit. The over-deep tag is a static symbol with no source location, so the event's partialStack is empty.",
      "template": "{{> node }}",
      "context": {
        "name": "1",
        "child": {
          "name": "2",
          "child": {
            "name": "3",
            "child": {
              "name": "4"
            }
          }
        }
      },
      "partials": {
        "node": "{{ name }}{{#if child }}{{#with child }}{{> node }}{{/with}}{{/if}}"
      },
      "maxPartialDepth": 2,
      "expect": {
        "kind": "output",
        "expectedOutput": "12",
        "softFails": [
          {
            "category": "RecursionLimit",
            "partialStack": [],
            "errorCode": "KB-5007"
          }
        ]
      }
    },
    {
      "name": "multiple-soft-fails-are-matched-in-emission-order",
      "description": "When a render emits more than one soft-fail event, softFails must list them in emission order: a TypeMismatch inside 'mathPartial' is reported before the UnresolvedReference from the dynamic partial key that follows it in the template. A runner that matched softFails as an order-insensitive set (as render-fixture's expectedSoftFails does) would also accept this fixture with the two entries swapped; the partials suite does not allow that, since a soft-fail's position in the array is itself asserted.",
      "template": "{{> mathPartial }}{{> (which) }}",
      "context": {
        "x": "not-a-number",
        "which": "nope"
      },
      "partials": {
        "mathPartial": "{{ x | abs }}"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "null",
        "softFails": [
          {
            "category": "TypeMismatch",
            "partialStack": [
              "mathPartial"
            ]
          },
          {
            "category": "UnresolvedReference",
            "partialStack": []
          }
        ]
      }
    }
  ]
}
