You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current test case syntax is pretty ugly in my opinion.
@Test('My test',[newTestCase('Two plus two is four',2,2,4),newTestCase(`Minus one that's three`,4,-1,3)])quickMaths(a: number,b: number,result: number){expect.toBeEqual(a+b,result);}
I think we can improve this. Here are a few examples of how we could go about it:
I like this syntax, but I'm not sure where we would put the timeout parameter, and we lose the opportunity to have a custom root-test name.
@TestCase('Two plus two is four',2,2,4)
@TestCase(`Minus one that's three`,4,-1,3)quickMaths(a: number,b: number,result: number){expect.toBeEqual(a+b,result);}
This option solves the name and timeout parameters problem and is still more readable than the current implementation.
@Test()
@TestCase('Two plus two is four',2,2,4)
@TestCase(`Minus one that's three`,4,-1,3)quickMaths(a: number,b: number,result: number){expect.toBeEqual(a+b,result);}
The text was updated successfully, but these errors were encountered:
The current test case syntax is pretty ugly in my opinion.
I think we can improve this. Here are a few examples of how we could go about it:
I like this syntax, but I'm not sure where we would put the timeout parameter, and we lose the opportunity to have a custom root-test name.
This option solves the name and timeout parameters problem and is still more readable than the current implementation.
The text was updated successfully, but these errors were encountered: