Codecrafters test --previous is now available!

In addition to testing the current stage, we now support testing previous stages using codecrafters test --previous. This allows verifying whether a refactor passes previous stages before working on the current stage.

3 Likes

This tests the previous as well as the current test. Can we isolate this to the previous test only? When doing a refactor, I’d like the ability to limit it to testing the previous stage alone.

Also, would like to add in a +1 for testing a specific stage as mentioned by @edgerunner on this thread. Sometimes, refactors for a previous stage can happen while solving another stage as I would have just discovered some code clean up or optimization.

1 Like

@kmadhu0 in case you weren’t aware, we intentionally change the order when using --previous so that previous tests are tested first - so you should be able to refactor and get those passing before worrying about the current stage.

We’ll look into supporting single stages!

1 Like