“ The men of Nineveh will rise up in the judgment with this generation and condemn it, because they repented at the preaching of Jonah; and indeed a greater than Jonah is here.”- Jesus
Why was Jonah preaching? Because God sent Jonah to "cry out against it; for their wickedness has come up" before God.
What was Jonah preaching? “Yet forty days, and Nineveh shall be overthrown!”
Was Nineveh overthrown after forty days? No.
Why did God relent? Because "God saw their works, that they turned from their evil way."
Or, in Jesus' words: “They repented at the preaching of Jonah.”
"The people of Nineveh believed God," AND "they turned from their evil way."
Their repentance wasn't merely a change of mind from not believing God's plan to believing it, and had they merely admitted God's plan without stopping their wickedness, God would not have relented and Jesus would not be commending them for any repentance. Their repentance was a change of mind concerning their evil way, and it was sincere in that they actually turned from their evil way, crying out to God, and God, who searches the hearts of mankind, saw it and confirmed it.
Consider the Hellenists in Antioch. After the persecution that arose over Stephen, some of the men, who were scattered, when they had come to Antioch, spoke to the Hellenists, preaching the Lord Jesus, and the hand of the Lord was with them, and a great number believed and turned to the Lord.
It seems appropriate to finish with the famous words of James -
“Faith without works is dead.”