J
04/24/2023, 2:10 PMif( loginAttempt > 3) {
cfthrow message="your account may be locked."
}
So, In the testbox side how can I able to achieve the expectations? Could you please help me?aliaspooryorik
toThrow
assertion. Something like:aliaspooryorik
expect(function(){ sut.myMethod(); }).toThrow("NoSuchChildException");
J
04/24/2023, 2:16 PMJ
04/24/2023, 2:17 PMaliaspooryorik
aliaspooryorik
try {
sut.myMethod();
fail("should have errored");
} catch (any e) {
expect(e.message).toBe("the message");
}
aliaspooryorik