logoalt Hacker News

Robdel12yesterday at 8:56 PM2 repliesview on HN

To me doing network interception in browser driven tests is a smell like that. Unless you’re running vs a full mocked server (like MSW).

I’m a big fan of testing exactly like a user. Users don’t use network intercepts, timeouts, etc. All of my most reliable tests assert on DOM state. If the user doesn’t see it, don’t assert on it.


Replies

dmdyesterday at 9:30 PM

Almost nothing I do has to do with what users actually see though. It’s all things like “why didn’t the SSO flow work”.

mewpmewp2today at 12:59 AM

I guess the issue is that real world does smell terribly. I wish I could just have the perfect World like my side projects always have, but not the case with the commercial ones making money.