import { haveText, html, test } from '../utils' test('can register custom data providers', html`
`, ({ get }) => get('span').should(haveText('bar')) ) test('can accept initial params', html`

`, ({ get }) => { get('h1').should(haveText('baz')) get('h2').should(haveText('bob')) } ) test('can spread together', html`

`, ({ get }) => { get('h1').should(haveText('baz')) get('h2').should(haveText('bob')) } ) test('init functions inside custom datas are called automatically', html`
`, ({ get }) => { get('span').should(haveText('baz')) } ) test('init functions "this" context is reactive', html`
`, ({ get }) => { get('span').should(haveText('bar')) get('button').click() get('span').should(haveText('baz')) } ) test('init functions have access to the parent scope', html`

`, ({ get }) => { get('p').should(haveText('bar')) } ) test('destroy functions inside custom datas are called automatically', html`
`, ({ get }) => { get('button').click() get('span').should(haveText('foo')) } ) test('destroy have access to the current scope', html`
baz `, ({ get }) => { get('span').should(haveText('baz')) get('button').click() get('span').should(haveText('bar')) } )