When fixing or adding behavior, update tests so they deterministically exercise the exact event/guard path and assert observable outcomes—never rely on “happy-path only” coverage.
Apply this checklist:
test(...) blocks won’t run; keep them as siblings under the suite).Example patterns:
suite('MyFeature', () => {
test('case A', () => { /* ... */ });
// Correct: sibling test
test('case B', () => { /* ... */ });
});
// After re-render, verify which element is tabbable
assert.strictEqual(focusedActionEl.getAttribute('tabindex'), '0');
assert.strictEqual(otherActionEl.getAttribute('tabindex'), null);
Following this standard will prevent the common failure modes shown here: guards/event paths not covered, tests not executing, interaction regressions slipping through, and fake services drifting away from real APIs.