The person who decides to accept the code is required to make sure the code has been properly tested.
They chose to accept the code, so the buck stops with them.
But that doesn't mean they have to actually test the code, they can delegate it to somebody else who is deemed competent.
As somebody contributing code, you should also make sure your work has been properly tested so you don't waste anybody else's time with obvious bugs.
Exactly who does the testing will depend on the people involved and the specific project. When I'm accepting code, if it's from somebody I don't know I will test it myself thoroughly every time. But if it's someone I know and they have a history of writing reliable and tested code, then I might only do a quick skim read over their code before accepting it.
There are more complex scenarios. For example a difficult to reproduce bug might require a binary sent to an end user who is the only person ever to see the problem. In that case you're getting the user to do your testing, but it is still the responsibility of the person accepting the code to make sure those tests were carried out properly.