How did the death of Karna happen?
Krishna testing Karna at time of death is not mentioned in Mahabharata. Karna's last moment is described in Mahabharata, Karna Parva, Section 91 as follows:
Meanwhile the diadem-decked and high-souled Arjuna, recovering his senses, took up a shaft, fatal as the rod of Death, and called anjalika. Then Vasudeva, addressing Partha, said, "Cut off with thy arrow the head of this enemy of thine, viz., Vrisha, before he succeeds in getting upon his car." Applauding those words of the lord Vasudeva, and while the wheel of his enemy was still sunk, the mighty car-warrior Arjuna took up a razor-headed arrow of blazing effulgence and struck the standard (of Karna) bearing the elephant's rope and bright as the spotless sun. That standard bearing the device of the costly elephant's rope, was adorned with gold and pearls and gems and diamonds, and forged with care by foremost of artists excelling in knowledge, and possessed of great beauty, and variegated with pure gold. That standard always used to fill thy troops with high courage and the enemy with fear. Its form commanded applause. Celebrated over the whole world, it resembled the sun in splendour. Indeed, its effulgence was like that of fire or the sun or the moon. The diadem-decked Arjuna, with that razor-headed shaft, exceedingly sharp, equipped with wings of gold, possessed of the splendour of fire when fed with libations of clarified butter, and blazing with beauty, cut off that standard of Adhiratha's son, that great car-warrior. With that standard, as it fell, the fame, pride, hope of victory, and everything dear, as also the hearts of the Kurus, fell, and loud wails of "Oh!" and "Alas!" arose (from the Kuru army). Beholding that standard cut off and thrown down by that hero of Kuru's race possessed of great lightness of hand, thy troops, O Bharata, were no longer hopeful of Karna's victory. Hastening then for Karna's destruction, Partha took out from his quiver an excellent Anjalika weapon that resembled the thunder of Indra or the rod of fire and that was possessed of the effulgence of the thousand-rayed Sun. Capable of penetrating the very vitals, besmeared with blood and flesh, resembling fire or the sun, made of costly materials, destructive of men, steeds, and elephants, of straight course and fierce impetuosity, it measured three cubits and six feet. Endued with the force of the thousand-eyed Indra's thunder, irresistible as Rakshasas in the night, resembling Pinaka or Narayana's discus, it was exceedingly terrible and destructive of all living creatures. Partha cheerfully took up that great weapon, in the shape of an arrow, which could not be resisted by the very gods, that high-souled being which was always adored by the son of Pandu, and which was capable of vanquishing the very gods and the Asuras. Beholding that shaft grasped by Partha in that battle, the entire universe shook with its mobile and immobile creatures. Indeed, seeing that weapon raised (for being sped) in that dreadful battle, the Rishis loudly cried out, "Peace be to the universe!" The wielder of Gandiva then fixed on his bow that unrivalled arrow, uniting it with a high and mighty weapon. Drawing his bow Gandiva, he quickly said, "Let this shaft of mine be like a mighty weapon capable of quickly destroying the body and heart of my enemy, if I have ever practised ascetic austerities, gratified my superiors, and listened to the counsels of well-wishers. Let this shaft, worshipped by me and possessed of great sharpness, slay my enemy Karna by that Truth." Having said these words Dhananjaya let off that terrible shaft for the destruction of Karna, that arrow fierce and efficacious as a rite prescribed in the Atharvan of Angiras, blazing with effulgence, and incapable of being endured by Death himself in battle. And the diadem-decked Partha, desirous of slaying Karna, with great cheerfulness, said, "Let this shaft conduce to my victory. Shot by me, let this arrow possessed of the splendour of fire or the sun take Karna to the presence of Yama." Saying these words, Arjuna, decked with diadem and garlands, cherishing feelings of hostility towards Karna and desirous of slaying him, cheerfully struck his foe with that foremost of shafts which was possessed of the splendour of the sun or the moon and capable of bestowing victory. Thus sped by that mighty warrior, that shaft endued with the energy of the sun caused all the points of the compass to blaze up with light. With that weapon Arjuna struck off his enemy's head like Indra striking off the head of Vritra with his thunder. Indeed, O king, with that excellent Anjalika weapon inspired with mantras into a mighty weapon, the son of Indra cut off the head of Vaikartana in the afternoon.
Note: “The question: How did the death of Karna happen?” is licensed by Stack Exchange Inc (https://hinduism.stackexchange.com/); user contributions licensed under CC BY-SA.