I used to read a lot of stuff on child development: the growth of language, stages in children's drawings, counting, singing. Things like that. I don't recall reading anything on the growth of a child's sense of humour. This is odd because humour plays a huge part in the life of babies and young children. Are there stages? Are there cross-cultural universals? Are there cultural differences? Are there humour prodigies?
Babies quickly discover that adults do things to them which are fun: throwing them in the air and catching them, tickling them, blowing raspberries on their stomachs. These are things which make babies laugh. Adults also succeed in making babies laugh by pulling funny faces or doing funny dances - I guess this comes a bit later, these are things which the baby finds funny. Then comes Peep-Bo and Hide and Seek - it's probably hard to sort out the differences between making jokes and playing other sorts of games since for babies and young children, jokes are very much practical jokes (Peep - Bo is maybe the earliest practical joke you can play. Fooled ya!).
When do babies get the idea that they can try to make adults laugh? Of course, adults laugh at them - babies do amusing things without meaning them to be amusing. But what does a baby have to realise (what cognitive developmental stage must it have reached) to realise that it can try to be amusing and that it's fun to try to be amusing?
And when a baby realises that, what are the first things they do to try to be funny? I really don't know what comes first other than to repeat that the earliest things are surely practical jokes. Babies don't stand there and say, Have you heard the one about ... (And when they get to school, it's not part of the curriculum to learn how to tell jokes that begin Have you heard the one about ... Surely something missing there, Mr Gove?)
Anyway, telling jokes comes later than making a joke out of a situation.
And where does a sense of irony come from? Maybe that has its roots in pretending. A young child develops a sense that not only can you be naughty but you can pretend to be naughty. That's maybe the heart of making mischief. So the child makes the gesture they would have to make if they were really going to knock the cornflakes off the table and the parents make the gesture of saying Oh No You Don't. And the child repeats the gesture with a smile. And so it goes on.
There must surely be a very big book on this subject somewhere. I must Google.