svelte/test/runtime/samples/select-props/_config.js

16 lines
385 B

export default {
test({ assert, component, target, window }) {
const selects = document.querySelectorAll('select');
const event1 = new window.Event('change');
selects[0].value = 'b';
selects[0].dispatchEvent(event1);
const event2 = new window.Event('change');
selects[1].value = 'b';
selects[1].dispatchEvent(event2);
assert.deepEqual(component.log, [1, 2]);
}
};