Tafsir of 29:11 Ma'arif al-Qur'an
وَلَيَعْلَمَنَّ ٱللَّهُ ٱلَّذِينَ ءَامَنُوا۟ وَلَيَعْلَمَنَّ ٱلْمُنَـٰفِقِينَ ﴿١١﴾
This commentary covers verses 29:10 to 29:11.
(1)-It means that such people join the infidels when they apprehend some kind of torture from them, but when Allah's help will come to the Muslims in a battle against the infidels, they will pretend to be Muslims on the plea that they had joined the infidels only because they feared to be persecuted by them.
(2)-The sense is that they did not believe in Islam with their hearts, and this fact cannot: be concealed from Him, because He knows whatever lies in the hearts of the people.
Source: Ma'arif al-Qur'an — Mufti Muhammad Shafi. Licence: Maktaba-e-Darul-Uloom; confirm