You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val staleFile = layout.snapshotPathForClass(stale)
117
-
if (snapshotsFilesWrittenToDisk.contains(staleFile)) {
118
-
throwAssertionError(
119
-
"Selfie wrote a snapshot and then marked it stale for deletion in the same run: $staleFile\nSelfie will delete this snapshot on the next run, which is bad! Why is Selfie marking this snapshot as stale?")
120
-
} else {
121
-
deleteFileAndParentDirIfEmpty(staleFile)
114
+
for (stale in findStaleSnapshotFiles(layout)) {
115
+
val staleFile =layout.snapshotPathForClass(stale)
116
+
if (snapshotsFilesWrittenToDisk.contains(staleFile)) {
117
+
throwAssertionError(
118
+
"Selfie wrote a snapshot and then marked it stale for deletion in the same run: $staleFile\nSelfie will delete this snapshot on the next run, which is bad! Why is Selfie marking this snapshot as stale?")
Copy file name to clipboardExpand all lines: jvm/selfie-runner-kotest/src/commonMain/kotlin/com/diffplug/selfie/kotest/SnapshotSystemKotest.kt
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -95,14 +95,14 @@ internal class SnapshotSystemKotest(settings: SelfieSettingsAPI) : SnapshotSyste
95
95
if (inlineWriteTracker.hasWrites()) {
96
96
inlineWriteTracker.persistWrites(layout)
97
97
}
98
-
}
99
-
for (stale in findStaleSnapshotFiles(layout)) {
100
-
val staleFile = layout.snapshotPathForClassOrFilename(stale)
101
-
if (snapshotsFilesWrittenToDisk.contains(staleFile)) {
102
-
throwAssertionError(
103
-
"Selfie wrote a snapshot and then marked it stale for deletion in the same run: $staleFile\nSelfie will delete this snapshot on the next run, which is bad! Why is Selfie marking this snapshot as stale?")
104
-
} else {
105
-
deleteFileAndParentDirIfEmpty(staleFile)
98
+
for (stale in findStaleSnapshotFiles(layout)) {
99
+
val staleFile =layout.snapshotPathForClassOrFilename(stale)
100
+
if (snapshotsFilesWrittenToDisk.contains(staleFile)) {
101
+
throwAssertionError(
102
+
"Selfie wrote a snapshot and then marked it stale for deletion in the same run: $staleFile\nSelfie will delete this snapshot on the next run, which is bad! Why is Selfie marking this snapshot as stale?")
0 commit comments