She asked for divorce and he said: “If this is really what you want in your heart then it is as you wish”
It is not permissible for a woman to ask for divorce unless there is a reason for that, such as bad treatment from the husband, because of the report narrated by Abu Dawood (2226), al-Tirmidhi (1187) and Ibn Maajah (2055) from Thawbaan (may Allaah be pleased with him) who said: “Any woman who asks her husband for a divorce when it is not absolutely necessary, the fragrance of Paradise will be forbidden to her.” Classed as saheeh by al-Albaani in Saheeh Abi Dawood.
This has been discussed in the answer to question no. 117185. The mere fact that there is an argument between the couple does not justify asking for divorce, and that applies even less to asking for a divorce in order to test the husband and find out the wife’s position with him. This is wrong. In such cases the shaytaan may succeed in tempting the husband to issue a divorce, or may convince him that his wife hates him and dislikes him.
Divorce should not be mentioned between husband and wife, either in jest or in earnest. Rather they should avoid even thinking of it, so long as their relationship is good, so that it will not become easy to think of taking that step.
Hence we say: Ask Allaah for forgiveness for this action, and apologize to your husband for what you pushed him to do.
If your husband said “If you really want a divorce in your heart then you are divorced”, and in fact you did not want a divorce, then this does not count as a divorce, and it is not an oath.
But your husband did not say that, rather he said something that was less serious than that, namely “If you want … then it is as you want.” This is not a clear statement of divorce, rather it is like a hint and a divorce does not take place unless the husband intends it.
See also the answer to question no. 98670.
Moreover, he made that conditional upon something that did not happen, which was your wanting a divorce.
So divorce did not take place when the husband said these words. And there is no need to offer expiation for breaking an oath (kafaraat yameen).
And Allaah knows best.