The Infancy Gospel of James, thought to date to the middle of the second century, is more concerned with Mary, the mother of Jesus, than with Jesus himself. In it, Mary’s miraculous pregnancy is followed by yet another miracle: She remains a virgin even after the birth of Jesus.
[As Mary is about to give birth, Joseph, the narrator, finds a midwife. She asks,] “And who’s the one having a baby in the cave?”… “Her name is Mary and she was raised in the temple of the Lord; I obtained her by lot as my wife. But she is not really my wife; she is pregnant by the holy spirit.”
… As she [the midwife] stood in front of the cave, a bright cloud overshadowed it. Suddenly the cloud withdrew from the cave and a great light appeared inside the cave, so that her eyes could not bear to look. And a little later that light receded until an infant became visible; he went and took the breast of his mother Mary. … The midwife left the cave and met Salome … [who said,] “As the Lord my God lives, unless I insert my finger and examine her, I will never believe that a virgin has given birth. The midwife entered and said, “Mary, position yourself for an examination. You are facing a serious test.” And so Mary, when she heard these instructions, positioned herself, and Salome inserted her finger into Mary. And then Salome cried aloud and said, “I am damned because of my transgression and my disbelief, since I have put the living God on trial. Look! I am losing my hand! It is being eaten by the flames.”