java-snapshot-testing
java-snapshot-testing copied to clipboard
snap.debug being produced due to running one single test instead of entire class
Here's a couple of cases related to what I'm describing:
- Run
MainTest.javaand it producesMainTest.snap. Afterwards, run a single function test insideMainTest.javaand it producesMainTest.snap.debugwith only the results from that function. - The reverse order of case 1. Run test
MainTest.javabut only for a single function and it producesMainTest.snap. RunMainTest.javafor the entire class and it cleans the existing snap file and adds new functions to it.
Case 1 seems like it should not create a snap.debug file. It created a snap.debug despite the results being the same and possibly only because it was testing a single function. Case 2 is behaving as I would expect.