Originally published as a GitHub Gist and migrated to this site.

A Pitfall in Frontend Component Testing