Hi, I've just finished the Introduction to Unit Testing course and I'm training doing tests for the candies challenge .
I'm trying to test the errors as there are Guaranteed constraints (1 ≤ n ≤ 10).
My code send me the error, but the test is failing and I don't understand why. Could you help me? I guess I don't see clearly anymore 🙈
I don't find the answer on Google links or stackoverflow...
I tried with and without error message, with and without try / catch block 🤔
I also tried to change the assert like this : expect(result).toThrow(new Error("sorry... n must be >= 1")); but it doesn't change.
I'm coding on GitHub codespace, I don't know if this could be the reason?
Here are some screenshots
Thanks a lot !