Add test cases

pull/3069/head
Bryan Terce 6 years ago
parent b1430273ed
commit 2ecd4df1e9
No known key found for this signature in database
GPG Key ID: DF2E2829CA6E5BF4

@ -0,0 +1,6 @@
<script>
export let actualValue;
let x = $$props;
</script>
<input bind:value={actualValue}>

@ -0,0 +1,14 @@
export default {
async test({ assert, target, window }) {
const input = target.querySelector('input');
const event = new window.Event('input');
input.value = 'changed';
await input.dispatchEvent(event);
assert.htmlEqual(target.innerHTML, `
<input>
<p>changed</p>
`);
}
};

@ -0,0 +1,7 @@
<script>
import Input from './TextInput.svelte';
export let actualValue = '';
</script>
<Input bind:actualValue />
<p>{actualValue}</p>
Loading…
Cancel
Save