The Gospels of Matthew and Mark describe a miracle in which Jesus curses a fig tree that was producing no fruit. When Jesus' disciples saw the same fig tree the next morning, they noticed that it had already withered. As explained in the Gospel of Mark:
. . .
In the morning, as they went along, they saw the fig tree withered from the roots. Peter remembered and said to Jesus, "Rabbi, look! The fig tree you cursed has withered!"
"Have faith in God," Jesus answered. "Truly I tell you, if anyone says to this mountain, 'Go, throw yourself into the sea,' and does not doubt in their heart but believes that what they say will happen, it will be done for them. Therefore I tell you, whatever you ask for in prayer, believe that you have received it, and it will be yours. And when you stand praying, if you hold anything against anyone, forgive them, so that your Father in heaven may forgive you your sins."
-Mark 11:12-14; 20-25, NIV translation.
To paraphrase the commentary of John Gill and other Bible scholars on Matthew 21:18-22 and Mark 11:12-14, 20-25, there could have been a reasonable expectation to find fruit on that particular fig tree because it was sprouting leaves to an extent that it was noticeable from a distance, regardless of whether it was yet harvesting time for figs. Gill was an English Baptist minister who wrote commentaries about the Bible during the 1700s.
Read more in the book Jesus the Miracle Worker: The 46 miracles of Jesus explained in chronological order (The Jesus Books) -- now available at amazon.