Skip to content

Commit

Permalink
failing test for #495
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Apr 19, 2017
1 parent f9432d1 commit 52a30dc
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/runtime/samples/binding-input-text-deconflicted/_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export default {
solo: true,

data: {
component: {
name: 'world'
}
},

html: `
<h1>Hello world!</h1>
<input>
`,

test ( assert, component, target, window ) {
const input = target.querySelector( 'input' );
assert.equal( input.value, 'world' );

const event = new window.Event( 'input' );

input.value = 'everybody';
input.dispatchEvent( event );

assert.equal( target.innerHTML, `
<h1>Hello everybody!</h1>
<input>
` );

component.set({ name: 'goodbye' });
assert.equal( input.value, 'goodbye' );
assert.equal( target.innerHTML, `
<h1>Hello goodbye!</h1>
<input>
` );
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Hello {{component.name}}!</h1>
<input bind:value="component.name"/>

0 comments on commit 52a30dc

Please sign in to comment.