Chapter 15 ends with Huck playing a practical Joke on Jim - pretending Jim dreamt the entire scene with the dangerous fog, losing Huck, and nearly losing the raft. The joke does not play out how Huck thinks it will. How does it end up?
Jim is so distraught over the dream he thinks he had, he decides he cannot continue on the journey.
Jim knows right away that Huck is playing him for a fool, but decides to turn it around and play his own joke on Huck.
Jim points out how a true friend would not play such a mean trick, making someone think they were a fool.
Jim thinks he has had a prophecy, and decides that it means they must abandon the raft, forcing Huck to go to shore.
Jim never believes Huck, proving to Huck that Jim is smarter than Huck thought, and convinces Huck to let Jim chose their next destination.