export default { preserveIdentifiers: true, get props() { return { links: ['a', 'b', 'c'] }; }, html: ` x#a x#b x#c `, test({ assert, component, target }) { component.links = ['d', 'e', 'f']; const links = [...target.querySelectorAll('a')]; assert.deepEqual( // Vitest/JSDom does prepend the base URL, so we need to strip it links.map((l) => l.href.slice(l.href.lastIndexOf('/') + 1)), ['x#d', 'x#e', 'x#f'] ); assert.htmlEqual( target.innerHTML, ` x#d x#e x#f ` ); } };