it('has an error message based on the rule.reason', () => { expect(errors[0]).toContain('fake reason'); }); it('has exactly one error', () => { expect(errors.length).toBe(1); }); });