Traditionally, very little, especially since it was not the job of a mechanical engineer to run complex calculations or work with electronics systems.
This slowly changed of course when more and more tools became electronic and/or digitized.
I suppose realistically you are not expected to know much or any computer science at all. You are definitely expected to be able to use a calculator or related software suite/IDE (like MATLAB, Excel), and you are expected to be able to use certain drafting software (AutoCAD, SolidWorks, etc) and general computer use.
Understanding beyond or separate from that really hinges upon the particular industry or job function you go into. Working with robotics or any other kind of electromechanical system? Better at least know how to rig up and copy-pasta-gram an Arduino and know how to set up a 3D printer or laser cutter.
But really wanting to do robotics? Then yeah, you end up seeping into CS/EE territory and with that comes increased expectations such as C/C++, Python, Arduino and beyond (microprocessors), and a better understanding of electronics.