{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "escape-all-metacharacters",
      "spotlight": true,
      "description": "Encodes &, <, >, double-quote, and single-quote as HTML entities. Uses {{{ }}} so the renderer does not re-escape the transform's output.",
      "template": "{{{ html | escape }}}",
      "context": {
        "html": "<b>A & 'B' \"C\"</b>"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "&lt;b&gt;A &amp; &#x27;B&#x27; &quot;C&quot;&lt;/b&gt;"
      }
    },
    {
      "name": "escape-double-escapes-existing-entity",
      "description": "Unlike escape_once, escape re-encodes the ampersand of an existing entity.",
      "template": "{{{ html | escape }}}",
      "context": {
        "html": "&amp;"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "&amp;amp;"
      }
    },
    {
      "name": "escape-no-special-characters",
      "spotlight": true,
      "description": "Plain text without metacharacters is returned unchanged.",
      "template": "{{{ html | escape }}}",
      "context": {
        "html": "hello world"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "hello world"
      }
    },
    {
      "name": "escape-with-arg-is-error",
      "description": "Any argument is an arity error.",
      "template": "{{{ html | escape: \"x\" }}}",
      "context": {
        "html": "hi"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
