Anything said or any activity performed just for fun or amusement is termed as jest.
In our day to day life we do jest many a times sometimes with good intentions but sometimes with bad intentions (an untold truth)
Being a good muslim or a good human we should know what our creator commanded us related to jest,
Lat us know about that in the light of authentic teaching of Prophet Muhammad
Abdullah ibn as-Sa’ib reported that his grandfather said, “I heard the Messenger of Allah (Muhammad ﷺ) say,
‘None of you should take the goods of his companion, either in jest or seriously.
(If ) When one of you takes his companion’s staff (belongings) , he should return it to him.'”
Al-Adab Al-Mufrad 241
In-book : Book 12, Hadith 4
Actually Islam discourage doing any activities which are hurts other or give tensions to the other,
Sometime we take something of other just for fun or amusement, so that the person worry about that and do a lot of effort for searching that particular and we enjoy all these situations.
Islam strictly condemn such activities which gives problems to others that’s why Prophet Muhammadﷺ said
None of you should take the goods of his companion, either in jest or seriously. When anyone of you takes his companion’s staff (belongings) , he should return it to him.
Such activities sometimes create a big problem maybe fighting among friends or colleagues or Companions and developed bad thinking in minds for the others which may be harmful in future.
So avoid such activities and create Peaceful social environment which will be beneficial for ourselves as well as for the others.
But a person can make joke etc (which don’t involve lie and also not hurts other ) for jest or amusement.
If is it for Shake of Almighty Allah for example to make happy a sad person it will be appreciated and rewardable Insha Allah.