import { haveText, html, test } from '../../utils' test('can expose data for x-model binding', html`

`, ({ get }) => { get('h1').should(haveText('foo')) get('h2').should(haveText('foo')) get('#1').click() get('h1').should(haveText('bob')) get('h2').should(haveText('bob')) get('#2').click() get('h1').should(haveText('lob')) get('h2').should(haveText('lob')) } ) test('Something like Livewire can hook into x-modelable', html`

`, ({ get }) => { get('span').should(haveText('BAR')) } ) test('x-modelable works when inside x-bind and x-model is outside', html`

`, ({ get }) => { get('h1').should(haveText('foo')) get('h2').should(haveText('foo')) get('#1').click() get('h1').should(haveText('bob')) get('h2').should(haveText('bob')) get('#2').click() get('h1').should(haveText('lob')) get('h2').should(haveText('lob')) } ) test('x-modelable removes the event listener used by corresponding x-model', html`

`, ({ get }) => { get('h1').should(haveText('foo')) get('h2').should(haveText('foo')) get('#1').click() get('h1').should(haveText('foo')) get('h2').should(haveText('foo')) } ) test('can have a named x-modelable', html`

`, ({ get }) => { get('h1').should(haveText('foo')) get('h2').should(haveText('foo')) get('#1').click() get('h1').should(haveText('bob')) get('h2').should(haveText('bob')) get('#2').click() get('h1').should(haveText('lob')) get('h2').should(haveText('lob')) } )