import { haveText, html, test } from '../../utils'
test('sets text on init',
html`
`,
({ get }) => get('span').should(haveText('baz'))
)
test('x-init can be used outside of x-data',
html`
`,
({ get }) => get('div').should(haveText('foo'))
)
test('changes made in x-init happen before the rest of the component',
html`
baz
`,
({ get }) => get('span').should(haveText('bar'))
)
test('can make deferred changes with $nextTick',
html`
baz
`,
({ get }) => get('span').should(haveText('yo'))
)
test('x-init will not evaluate expression if it is empty',
html`
baz
`,
({ get }) => get('span').should(haveText('bar'))
)