')
})
it('should create an element with direct text children', () => {
const { html } = define({
render() {
return template(`
foo bar`)()
},
}).render()
expect(html()).toBe('
foo bar
')
})
it('should create an element with direct text children and props', () => {
const { html } = define({
render() {
return template(`
bar`)()
},
}).render()
expect(html()).toBe('
bar
')
})
it.fails('should update an element tag which is already mounted', () => {
const { html } = define({
render() {
return template(`
foo`)()
},
}).render()
expect(html()).toBe('
foo
')
define({
render() {
return template(`
foo`)()
},
}).render()
expect(html()).toBe('foo')
})
it.fails('should update element props which is already mounted', () => {
const { html } = define({
render() {
return template(`foo`)()
},
}).render()
expect(html()).toBe('
foo
')
define({
render() {
return template(`
foo`)()
},
}).render()
expect(html()).toBe('
foo
')
})
})