Allow line number stability too (#1)

This commit is contained in:
Patrick Stevens
2025-06-16 00:36:50 +01:00
committed by GitHub
parent 62ae417701
commit c9230c24ce
3 changed files with 18 additions and 11 deletions

View File

@@ -17,7 +17,7 @@ module SimpleTest =
let ``Example of a failing test`` () =
expect {
snapshot
"snapshot mismatch! snapshot at filepath.fs:32 (Example of a failing test) was:
"snapshot mismatch! snapshot at filepath.fs:99 (Example of a failing test) was:
- 123
@@ -28,10 +28,17 @@ actual was:
return
Assert
.Throws<Exception>(fun () ->
expectWithMockedFilePath "filepath.fs" {
expectWithMockedFilePath ("filepath.fs", 99) {
snapshot "123"
return 124
}
)
.Message
}
[<Test>]
let ``Basic example`` () =
expect {
snapshot "123"
return 123
}