Not sure what “agile” projects you are talking about, but SCRUM doesn’t advocate writing documentation.
Also SCRUM has a concept of Definition of Done, which can include writing the unit/functional/integration tests related to your task.
Also SCRUM recommends to have a human tests that your task is not bugged before shipping (that’s the job of the PO or the tech lead).