Unit test coverage doesn't correlate with production reliability, especially frontend. You're measuring the wrong thing.
Skip the unit test obsession. Focus on integration tests that actually exercise your real code paths: user interactions, API calls, state changes. That catches 80% of what breaks in prod. Keep e2e lean, just critical user flows.
For flakiness: explicit waits are garbage. Use waitForFunction with meaningful conditions instead of arbitrary timeouts. Your CI environment matters too—if it's slower, tests fail differently. Run e2e against staging, not just locally.
What actually worked for me: fewer, better tests beats coverage metrics every time.