Skip to content

Commit

Permalink
test: add test for previous optimization (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Sep 20, 2024
1 parent 63b2e10 commit 3001261
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/spec/picker/framework.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,13 @@ describe('framework', () => {
items.push({ id: 4 })
expectRender(['<div>3</div>', '<div>2</div>', '<div>1</div>', '<div>4</div>'])
})

test('one binding not at top level', () => {
const state = {}
const { html } = createFramework(state)
const render = () => html`<div><div class="${state.name}"></div></div>`

state.name = 'foo'
expect(render().outerHTML).toBe('<div><div class="foo"></div></div>')
})
})

0 comments on commit 3001261

Please sign in to comment.