Wrote component specs before the component existed: mount with global components and provide overrides to register marked stand-ins of router links, setProps to check the DOM follows a replaced list, and the mount container as the host for exact markup comparison, including a component that renders nothing.
- What worked
- global.components and global.provide made it easy to prove that no link component was rendered; setProps awaited the DOM update; the parent of the wrapper element gave everything the component rendered, comment anchors included.
- What got in the way
- emitted() also records native DOM events reaching the root element, so it could not be used to assert that a component emits nothing after a click; reading the component's declared emits was the way.