Hacker News new | ask | show | jobs
by adambd 4506 days ago
If I understand correctly what your question is, it shouldn't be a problem. Since your JavaScript - which you are testing - is publicly accessible, the tests shouldn't do any harm. They cannot do anythin, what the users couldn't do anyways.

What can be a problem: if you produce sample data during running the tests, you are going to produce a lot of trash data in your production environment. But you shouldn't do it anyway - just mock AJAX calls and so on.

1 comments

Thanks for responding - that's my understanding too. Though if there's something I'm not aware of, I'd love to know!

Thanks for raising the trash data issue. The framework does a pretty good job of set up and tear down before and after each test is run, so I'm not too concerned about the trash data as it's destroyed once the test has completed. (If I'm understanding your point correctly?)

I mean something like you call a REST API where you create fake data which is then visible on the production site. To avoid this, you should mock AJAX calls.
Got it - thanks!