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.
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.
@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!
Just a note that if you really want to run a particular test, you can reverse engineer the local command to test on your computer. For e.g., the code to test for bittorent is here GitHub - codecrafters-io/bittorrent-test-seeder