This is a test of US, not Israeli resolve. The messaging that the possible attack will not come before the election is clear. Should this attack happen, it will necessarily be escalatory. Iran certainly does not doubt Israeli resolve and understands that Israel’s degradation of their air defense capabilities during late October operations puts sensitive targets at risk. Carrying out operations from a third country - Iraq, Syria, or Lebanon - also risks expanding the scope of the conflict. Iran also understands that a successful severe attack against Israel risks eliciting a direct U.S. response. My initial reaction is that is an effort to encourage US pressure on Israel to wind down operations in Lebanon and Gaza, allowing Iran to back down from these threats having gained concessions.
The risk is, of course, the more chips players throw on the table, the higher the stakes.
https://www.wsj.com/world/middle-east/iran-tells-region-strong-and-complex-attack-coming-on-israel-2804179f