How to test IR sensor module?
To figure out what is going on you are just going to have to break down and measure the signals at the + and - input of the comparator to see what is happening there in terms of voltages. Only then can you deduce what is wrong. Make sure to use a volt meter that has a high input impedance and not some cleap 20K ohms input impedance meter. 

Some things that can be learned by that are:


What voltage does the pot present to the - input of the comparator?
Can you verify that the pot adjustment allows setting the - input anywhere from 0 to 5 volts?
What voltage is presented to the + input from the photo diode node?
Can you see changes in the voltage at the + input of the comparator as you block and unblock the photo diode?
What are the voltage levels at the + input when the photo diode is blocked and unblocked?
Can you adjust the pot so that the voltage at the - input is exactly half way in between the blocked and unblocked voltages on the + input?
If you can achieve a YES to #6 then does the comparator output change state now between the blocked and unblock states of the photo diode.


If you can get through all of these steps and understand how the circuit performs you should be able to achieve success or conclude that some component is bad.