Dissonant whispers (PHB, pg. 235) says:
The target must make a Wisdom saving throw. On a failed save, it takes 3d6 psychic damage and must immediately use its reaction to move as far as its speed allows away from you. The creature doesn’t move into obviously dangerous ground.
If someone holds their action to cast this with the trigger being to cast it on a hidden enemy when they reveal themselves, then when the enemy does reveal themselves, and the readied spell is cast, and the enemy fails their save, they must then immediately use their reaction to run away as far as their speed.
However, since this is now happening on that enemy’s turn, do they still have their movement for that turn, or did they just waste it running away as per the spell’s effects?