Skip to content

Commit 8b9bcac

Browse files
committed
Better error messages for VCR not finding comment.
1 parent d726d4f commit 8b9bcac

File tree

1 file changed

+5
-3
lines changed
  • jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie

1 file changed

+5
-3
lines changed

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/Mode.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,11 @@ enum class Mode {
7272
interactive ->
7373
"$headline\n" +
7474
(if (headline.startsWith("Snapshot "))
75-
"‣ update this snapshot by adding `_TODO` to the function name\n"
76-
else "") +
77-
"‣ update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`"
75+
"‣ update this snapshot by adding `_TODO` to the function name\n" +
76+
"‣ update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`"
77+
else
78+
"‣ update all snapshots in this file by adding `//selfieonce` or `//SELFIEWRITE`\n" +
79+
"‣ if that doesn't work remember to put your test rule into the `selfie` package")
7880
readonly -> headline
7981
overwrite -> "$headline\n(didn't expect this to ever happen in overwrite mode)"
8082
}

0 commit comments

Comments
 (0)