3 ms·
>avoid code sharing wherever possible. Oh dear Lord. Are you really serious? >write far more unit tests than functional/integration tests. This is a terrible
by crdoconnor 11y ago
>avoid code sharing wherever possible.
Oh dear Lord. Are you really serious?
>write far more unit tests than functional/integration tests.
This is a terrible idea. Integration tests are by their very nature loosely coupled, whereas unit tests are tightly coupled.
>(if you separate out components later, those tests can't move with them)
If you refactor code under the hood you will inevitably end up throwing away unit tests unless your code is already very loosely coupled.
>if you use an ORM or similar, you are probably going to have a very bad time about it
Using (good) ORMs helps you to significantly reduce boilerplate code. Reducing boilerplate code is always a good thing.