Unless, of course, one isn't following a policy of MAD, but instead repetively muttering 'Allah, Achbar', perceives the road to glory is paved in their immediate work, and then, even a test might not be operationally best deployed as a demonstration, rather, their best demonstration might be in a destructive test on a foreign target.
When people were concerned about WMD fabrication processes having advanced into the 21st century, they were also concerned with modern logistics and manufacturing just-in-time methods being used in compartmentalized fashions making a response that less likely for countering such a threat with success.
If the Iranians do that the best result Iran can hope for is that the device when triggered goes "Click" otherwise there will not be enough virgins for all of the dead.