Discernment, Greek diakrisis, was prized by the desert fathers as the queen of virtues. Ignatius of Loyola set out rules for it in the Spiritual Exercises, attending to consolation and desolation. Every tradition that takes inner experience seriously develops some such art of testing it.
Discernment of spirits
The art of distinguishing movements of the soul that come from God from those that lead away from God.
Also: diakrisis