Testamentary capacity refers to the mental ability of the person making the will to understand the nature of the document, the extent of their estate, and the claims of those who might expect to benefit from the will.