mirror of https://github.com/sveltejs/svelte
parent
37f8f8afe3
commit
58ff7e213c
@ -0,0 +1 @@
|
|||||||
|
<input bind:value='name'>
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"bind": false
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"hash": 1937205193,
|
||||||
|
"html": {
|
||||||
|
"start": 0,
|
||||||
|
"end": 25,
|
||||||
|
"type": "Fragment",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"start": 0,
|
||||||
|
"end": 25,
|
||||||
|
"type": "Element",
|
||||||
|
"name": "input",
|
||||||
|
"attributes": [
|
||||||
|
],
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"css": null,
|
||||||
|
"js": null
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
export default {
|
||||||
|
data: {
|
||||||
|
name: 'world'
|
||||||
|
},
|
||||||
|
compileOptions: {
|
||||||
|
bind: false
|
||||||
|
},
|
||||||
|
html: `<input>\n<p>hello world</p>`,
|
||||||
|
test ( assert, component, target, window ) {
|
||||||
|
const input = target.querySelector( 'input' );
|
||||||
|
assert.equal( input.value, '' );
|
||||||
|
|
||||||
|
const event = new window.Event( 'input' );
|
||||||
|
|
||||||
|
input.value = 'everybody';
|
||||||
|
input.dispatchEvent( event );
|
||||||
|
|
||||||
|
assert.equal( target.innerHTML, `<input>\n<p>hello world</p>` );
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
<input bind:value='name'>
|
||||||
|
<p>hello {{name}}</p>
|
Loading…
Reference in new issue