Before a build is released for testing team, developer will perform basic validation testing and once the build is released 1st most basic step - Sanity test will done by a tester. Once a sanity test has been passed then only the build will move further for functional tests etc.,
Sanity testing should be done by testers and developers will not involve, because sanity test basically have more number of test cases where dev will test only basic functionality of product before send to testers