Unit tests have lower up front costs but higher ongoing costs. By their very nature they couple more to implementation details, so they will not give you clear confirmation when code is broken.
Integration tests can give unclear signals when they are flaky, but when they are engineered well they will give a much clearer signal that things work when they pass and that something is broken when they fail.
It's harder to engineer a good integration test - this includes making them isolated and independent e.g. of test ordering or indeed, anything else.
Integration tests can give unclear signals when they are flaky, but when they are engineered well they will give a much clearer signal that things work when they pass and that something is broken when they fail.
It's harder to engineer a good integration test - this includes making them isolated and independent e.g. of test ordering or indeed, anything else.