Case Study: Smoke Tests for Bookmarklets
The problem: Hard to test browser extensions automatically.
The trick: Clear error logging.
if (!document.querySelector('.tweet-text')) {
console.error('Expected .tweet-text, found none');
console.log('Available:',
document.querySelectorAll('[class]'));
}
When Twitter changes DOM → clear error → paste to AI → fixed