Failing hidden test cases mainCalculateReturnsOldTrades , mainCalculateVaryingDateRanges

If you are facing assessment failure in test cases mainCalculateReturnsOldTrades() and/or mainCalculateVaryingDateRanges():

These test cases are more of a puzzle that you have to build upon by understanding the code you have written and figuring out edge cases of your own. Some hints:

  1. What will happen when the required dates are beyond the range of date received from API?
  2. What happens when you calculate the time span? Accuracy is the key!
  3. Do you even sort bro?

Figuring out the edge cases is all that you need to do in order to complete this module. Cheers!

Hey @yash-krishan-verma Have a look here - How to pass Calculate Returns Varying Date Ranges and Calculate Returns Old Trades

1 Like