The Scrum Guide says that a each product increment is "thoroughly verified" and "meets the Definition of Done". So code should of course be tested and can be handed over to testers if that's the process the team uses but that testing should be done withinwithin sprints. There is no testing "stage" because each sprint delivers only tested outcomes.
The Agile Manifesto in particular (and organizational agility in general) emphasises that teams ought to be empowered and self-organising, which in software development normally equates to cross-functional teams rather than specialist teams. In other words a team contains everyone needed to build and test the product. Handovers do happen within teams but handovers between teams are minimised.