Not able to run previous test cases

Currently I am on #IP1 but before solving this challenge I refactored my code. I wanted to run cases for #MG5.

I referred to this Codecrafters test --previous is now available! and tried running the below command but was not able to get any results, please let me know where am I going wrong.

Can you try following the instructions here please? How do I install the CLI? - CodeCrafters

Doesn’t look like the CLI is installed on your machine.

Hi @rohitpaulk thanks a lot for your help. I was able to run cases but there is one doubt. This command codecrafters test --previous is also running cases for the current challenge as well.

One thing which I have understood is that when we write git push origin master that time test cases run from the current challenge to the first challenge.

But when we do codecrafters test --previous that time it runs from first test case to the current test case. Is the testing of current test case expected?

Hey @kaffikoda Yes, that’s expected!

codecrafters test --previous runs all stages from the first up to and including your current stage to ensure everything still works as you progress.

If you want the same order as git push, simply run codecrafters test.

Thanks for letting me know. This was super useful.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.