The irresistible impulse test is a test that is required in some jurisdictions in America when a defendant is pleading insanity.
The goal of the irresistible impulse test is to determine whether a person was in control of their actions, or whether they had no control due to mental illness.
In order for a defendant to pass the irresistible impulse test, it must be proven that a mental illness existed and also that this mental illness prevented the person from being able to act in accordance with the law. If both of these conditions are met, then a defendant may be able to successfully plead not guilty by reason of insanity.
Certain mental illnesses, such as schizophrenia or Alzheimer's disease, can legitimately cause a person to lose control of their actions.