Skip to content

Commit

Permalink
Add tests to support svg elements
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Apr 8, 2024
1 parent ec250e6 commit 1c6ae8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/@glimmer/compiler/test/compiler-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,20 @@ test(
['<svg>', [['<linearGradient>', { id: s`gradient` }]]]
);

for (let svgElement of ['animate', 'animateMotion', 'animateTransform', 'circle', 'clipPath',
'defs', 'desc', 'ellipse', 'feBend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix',
'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB',
'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight',
'feSpecularLighting', 'feTile', 'feTurbulence', 'filter', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'marker', 'mask', 'metadata',
'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'set', 'stop', 'switch', 'symbol', 'text', 'textPath',
'title', 'tspan', 'use', 'view']) {
test(
`${svgElement} is valid`,
`<svg><${svgElement}></${svgElement}></svg>`,
['<svg>', [[`<${svgElement}>`]]]
);
}

test('curlies separated by content whitespace', `{{a}} {{b}}`, '^a', s` `, '^b');

test('curlies right next to each other', `<div>{{a}}{{b}}{{c}}wat{{d}}</div>`, [
Expand Down

0 comments on commit 1c6ae8f

Please sign in to comment.