diff --git a/test/spec/picker/framework.test.js b/test/spec/picker/framework.test.js index 2fedb7a..c644672 100644 --- a/test/spec/picker/framework.test.js +++ b/test/spec/picker/framework.test.js @@ -58,6 +58,24 @@ describe('framework', () => { expect(node.outerHTML).toBe('
foo
') }) + test('dynamic expression with whitespace around it - minifier should be working', () => { + const state = { name: 'foo' } + + const { html } = createFramework(state) + + let node + const render = () => { + node = html`
${state.name}\t\n
` + } + + render() + expect(node.outerHTML).toBe('
foo
') + + state.name = 'baz' + render() + expect(node.outerHTML).toBe('
baz
') + }) + // Framework no longer supports this since we switched from HTML comments to text nodes test.skip('render two dynamic expressions inside the same element', () => { const state = { name1: 'foo', name2: 'bar' }