|
|
@ -1,16 +1,12 @@
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
html: '<input type="text"><input type="text"><input type="text">',
|
|
|
|
|
|
|
|
async test({ assert, component, target }) {
|
|
|
|
async test({ assert, component, target }) {
|
|
|
|
|
|
|
|
assert.equal(target.querySelectorAll('input').length, 3);
|
|
|
|
|
|
|
|
|
|
|
|
const input = target.querySelector('input');
|
|
|
|
const input = target.querySelector('input');
|
|
|
|
input.value = 'svelte';
|
|
|
|
input.value = 'svelte';
|
|
|
|
await input.dispatchEvent(new window.Event('input'));
|
|
|
|
await input.dispatchEvent(new window.Event('input'));
|
|
|
|
|
|
|
|
|
|
|
|
assert.htmlEqual(
|
|
|
|
assert.equal(target.querySelectorAll('input').length, 3);
|
|
|
|
target.innerHTML,
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
<input type="text"><input type="text"><input type="text">
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
assert.deepEqual(component.data, { a: 'svelte', b: 'B', c: 'C' });
|
|
|
|
assert.deepEqual(component.data, { a: 'svelte', b: 'B', c: 'C' });
|
|
|
|
assert.deepEqual(component.x, ['a', 'b', 'c']);
|
|
|
|
assert.deepEqual(component.x, ['a', 'b', 'c']);
|
|
|
|
},
|
|
|
|
},
|
|
|
|