🐦‍⬛ Snapshot testing in Gleam
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

:bug: Fix snapshot tests failing on Windows

+6 -1
+5 -1
CHANGELOG.md
··· 1 # Changelog 2 3 ## v1.2.1 - 2024-08-20 4 5 - ⬆️ Update `stdlib` to `>= 0.40.0 and < 1.0.0` ··· 7 ## v1.2.0 - 2024-08-12 8 9 - ✨ Birdie can now suggest and run the correct command if it can tell you've 10 - made a typo. 11 12 ## v1.1.8 - 2024-05-28 13
··· 1 # Changelog 2 3 + ## Unreleased 4 + 5 + - 🐛 Fixed a bug where snapshot tests would fail on Windows 6 + 7 ## v1.2.1 - 2024-08-20 8 9 - ⬆️ Update `stdlib` to `>= 0.40.0 and < 1.0.0` ··· 11 ## v1.2.0 - 2024-08-12 12 13 - ✨ Birdie can now suggest and run the correct command if it can tell you've 14 + made a typo 15 16 ## v1.1.8 - 2024-05-28 17
+1
src/birdie.gleam
··· 199 } 200 201 fn deserialise(raw: String) -> Result(Snapshot(a), Nil) { 202 case split_n(raw, 4, "\n") { 203 Ok(#(["---", "version: " <> _, "title: " <> title, "---"], content)) -> 204 Ok(Snapshot(title: title, content: content, info: None))
··· 199 } 200 201 fn deserialise(raw: String) -> Result(Snapshot(a), Nil) { 202 + let raw = string.replace(each: "\r\n", in: raw, with: "\n") 203 case split_n(raw, 4, "\n") { 204 Ok(#(["---", "version: " <> _, "title: " <> title, "---"], content)) -> 205 Ok(Snapshot(title: title, content: content, info: None))