import { test } from '../../test'; export default test({ get props() { return { /** @type {string[]} */ items: [], selected: 'two' }; }, html: `

selected: two

`, async test({ assert, component, target }) { component.items = ['one', 'two', 'three']; await Promise.resolve(); // mutation observer const options = target.querySelectorAll('option'); assert.ok(!options[0].selected); assert.ok(options[1].selected); assert.ok(!options[2].selected); assert.htmlEqual( target.innerHTML, `

selected: two

` ); } });