java-snapshot-testing icon indicating copy to clipboard operation
java-snapshot-testing copied to clipboard

snap.debug being produced due to running one single test instead of entire class

Open deeTEEcee opened this issue 10 months ago • 0 comments

Here's a couple of cases related to what I'm describing:

  1. Run MainTest.java and it produces MainTest.snap. Afterwards, run a single function test inside MainTest.java and it produces MainTest.snap.debug with only the results from that function.
  2. The reverse order of case 1. Run test MainTest.java but only for a single function and it produces MainTest.snap. Run MainTest.java for 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.

deeTEEcee avatar Jan 07 '25 23:01 deeTEEcee